We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 30dba99 commit e588da0Copy full SHA for e588da0
frontend/src/routes/_publicLayout/login.tsx
@@ -13,6 +13,8 @@ import { emailPattern } from '../../utils'
13
export const Route = createFileRoute('/_publicLayout/login')({
14
component: Login,
15
beforeLoad: async () => {
16
+ // NOTE: Direct localStorage access is used here because React context is not available in router guards.
17
+ // For all React components, use useAuthContext() from './hooks/useAuthContext' instead.
18
const isGuest = localStorage.getItem('guest_mode') === 'true'
19
const isLoggedIn = Boolean(localStorage.getItem('access_token')) || isGuest
20
if (isLoggedIn) {
0 commit comments