fix: oauth route after the callback #287
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because 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.
This pull request includes several changes to the
Layout
component and theCallbackPage
component to improve currency validation and user redirection. The most important changes include adding state management for client currency, refactoring currency validation logic, and updating the redirection logic on the callback page.Improvements to currency validation and state management:
src/components/layout/index.tsx
: AddedsetClientHasCurrency
to the state management for client currency.src/components/layout/index.tsx
: Refactored the currency validation logic to use aSet
for checking if all currencies are present and updated the state accordingly.src/components/layout/index.tsx
: Updated theuseEffect
dependency to includeclientHasCurrency
in the conditions for triggering OIDC authentication.Enhancements to user redirection:
src/pages/callback/callback-page.tsx
: Modified the redirection logic to use the previous location from the browser history state if available, otherwise default to the root path.