BED-5811: Get rid of homepage redirect loop #1420
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because
30C4
no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Currently, once a user logs in to the application, if they try to click back they will end up in a redirect loop and will not be able to progress any further back in their browser's history.
This change updates these redirects to use the
replace
prop from react-router, which will replace the current entry on the history stack instead of pushing a new entry. This means that if a user clicks back immediately after logging in, they should end up on whatever page they were on before they navigated to our application.This change also plumbs through a second optional param to our setter functions for query params introduced with deep linking. This allows us to pass react routers'
NavigateOptions
object through to those URL updates.Motivation and Context
Resolves: BED-5811
How Has This Been Tested?
Screenshots (optional):
Screen.Recording.2025-04-30.at.10.04.00.AM.mov
Types of changes
Checklist: