We want the user to have the compare panel and compare schedules turned on when they accept an invite. Currently, to accept an invite, the user first hits the InviteBacklink component and gets redirected to the root route with some query parameters. These query parameters are read by the InvitationAcceptModal and appropriate data is shown to the user.
Your Goal
Move the InvitationAcceptModal component from src/Components/App/content.tsx to src/Components/ComparisonPanel/index.tsx so that we can pass in the Compare UI state setter to this component.
Update the compare state hook to now also include state for whether the panel is currently expanded, this state is currently inside ComparisonPanel. This state now needs to be passed as a prop to ComparisonPanel.
If the user is successful in accepting the invitation, turn on the compare schedule feature and expand the panel using the state setter from the hook.
Problem Description
We want the user to have the compare panel and compare schedules turned on when they accept an invite. Currently, to accept an invite, the user first hits the
InviteBacklink
component and gets redirected to the root route with some query parameters. These query parameters are read by theInvitationAcceptModal
and appropriate data is shown to the user.Your Goal
InvitationAcceptModal
component fromsrc/Components/App/content.tsx
tosrc/Components/ComparisonPanel/index.tsx
so that we can pass in the Compare UI state setter to this component.ComparisonPanel
. This state now needs to be passed as a prop toComparisonPanel
.