issue-47 #59

Merged
y merged 2 commits from issue-47 into main 2024-05-17 13:39:01 +00:00
2 changed files with 5 additions and 10 deletions
Showing only changes of commit a1f16c33b2 - Show all commits

View File

@ -35,7 +35,9 @@ const App = () => {
const handleRootRedirect = () => {
if (authState.loggedIn) return appPrivateRoutes.homePage
const callbackPathEncoded = btoa(window.location.href.split(`${window.location.origin}/#`)[1])
const callbackPathEncoded = btoa(
window.location.href.split(`${window.location.origin}/#`)[1]
)
return `${appPublicRoutes.login}?callbackPath=${callbackPathEncoded}`
}
@ -72,14 +74,7 @@ const App = () => {
}
})}
<Route
path="*"
element={
<Navigate
to={handleRootRedirect()}
/>
}
/>
<Route path="*" element={<Navigate to={handleRootRedirect()} />} />
</Route>
</Routes>
)