Skip to content

Commit e588da0

Browse files
feat: minor change
1 parent 30dba99 commit e588da0

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

frontend/src/routes/_publicLayout/login.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ import { emailPattern } from '../../utils'
1313
export const Route = createFileRoute('/_publicLayout/login')({
1414
component: Login,
1515
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.
1618
const isGuest = localStorage.getItem('guest_mode') === 'true'
1719
const isLoggedIn = Boolean(localStorage.getItem('access_token')) || isGuest
1820
if (isLoggedIn) {

0 commit comments

Comments
 (0)