Skip to content

Commit

Permalink
fix(inactives): Don't hard navigate when redirectTo is 'settings'
Browse files Browse the repository at this point in the history
Because:
* This is causing the integration to get recreated in Settings, and we're not currently passing params into Settings, meaning the integration query param data is undefined and the active banner is not shown

This commit:
* Checks that the 'redirectTo' condition in our signin utils does not equal '/settings', to avoid the hard navigate
  • Loading branch information
LZoog committed Feb 5, 2025
1 parent 0abe024 commit a910c1f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/fxa-settings/src/pages/Signin/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,9 @@ const getNonOAuthNavigationTarget = async (
),
};
}
if (redirectTo) {
// We don't want a hard navigate to `/settings` as it
// clears out the initially created integration.
if (redirectTo && redirectTo !== '/settings') {
return { to: redirectTo, shouldHardNavigate: true };
}
return { to: '/settings' };
Expand Down

0 comments on commit a910c1f

Please sign in to comment.