diff --git a/libs/react-spa/bff/src/lib/BffProvider.tsx b/libs/react-spa/bff/src/lib/BffProvider.tsx index 14557770b1a8..13c7dfb4f3b7 100644 --- a/libs/react-spa/bff/src/lib/BffProvider.tsx +++ b/libs/react-spa/bff/src/lib/BffProvider.tsx @@ -235,9 +235,14 @@ export const BffProvider = ({ setSessionExpiredScreen(true) }, []) - const onRetry = () => { + const onRetry = useCallback(() => { window.location.href = applicationBasePath - } + }, [applicationBasePath]) + + const onKeepCurrentUser = useCallback(() => { + BffError.removeBffErrorParamsFromURL() + onRetry() + }, [onRetry]) const renderContent = () => { if (mockedInitialState) { @@ -255,7 +260,7 @@ export const BffProvider = ({ return ( ) }