mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-20 06:11:11 -05:00
fix: update vite version and improve session handling in useAuth hook
- Updated vite from version 5.4.19 to 7.1.9 in package.json for better performance and features. - Enhanced session verification logic in useAuth hook to check for session.user before setting user state.
This commit is contained in:
2593
package-lock.json
generated
2593
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -88,6 +88,6 @@
|
|||||||
"tailwindcss": "^3.4.17",
|
"tailwindcss": "^3.4.17",
|
||||||
"typescript": "^5.8.3",
|
"typescript": "^5.8.3",
|
||||||
"typescript-eslint": "^8.38.0",
|
"typescript-eslint": "^8.38.0",
|
||||||
"vite": "^5.4.19"
|
"vite": "^7.1.9"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -178,7 +178,7 @@ function AuthProviderComponent({ children }: { children: React.ReactNode }) {
|
|||||||
setUser(session.user);
|
setUser(session.user);
|
||||||
sessionVerifiedRef.current = true;
|
sessionVerifiedRef.current = true;
|
||||||
} else if (event === 'INITIAL_SESSION') {
|
} else if (event === 'INITIAL_SESSION') {
|
||||||
if (session) {
|
if (session?.user) {
|
||||||
console.log('[Auth] INITIAL_SESSION detected with session, setting user');
|
console.log('[Auth] INITIAL_SESSION detected with session, setting user');
|
||||||
setSession(session);
|
setSession(session);
|
||||||
setUser(session.user);
|
setUser(session.user);
|
||||||
|
|||||||
Reference in New Issue
Block a user