Skip to content

Commit

Permalink
Reload the current page
Browse files Browse the repository at this point in the history
  • Loading branch information
snaerth committed Dec 23, 2024
1 parent f962256 commit 7276b36
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions libs/react-spa/bff/src/lib/BffProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -235,14 +235,10 @@ export const BffProvider = ({
setSessionExpiredScreen(true)
}, [])

const onRetry = useCallback(() => {
window.location.href = applicationBasePath
}, [applicationBasePath])

const onKeepCurrentUser = useCallback(() => {
const onRetry = () => {
BffError.removeBffErrorParamsFromURL()
onRetry()
}, [onRetry])
window.location.reload()
}

const renderContent = () => {
if (mockedInitialState) {
Expand All @@ -260,7 +256,7 @@ export const BffProvider = ({
return (
<BffDoubleSessionModal
onSwitchUser={switchUser}
onKeepCurrentUser={onKeepCurrentUser}
onKeepCurrentUser={onRetry}
/>
)
}
Expand Down

0 comments on commit 7276b36

Please sign in to comment.