mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-22 07:11:12 -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:
@@ -178,7 +178,7 @@ function AuthProviderComponent({ children }: { children: React.ReactNode }) {
|
||||
setUser(session.user);
|
||||
sessionVerifiedRef.current = true;
|
||||
} else if (event === 'INITIAL_SESSION') {
|
||||
if (session) {
|
||||
if (session?.user) {
|
||||
console.log('[Auth] INITIAL_SESSION detected with session, setting user');
|
||||
setSession(session);
|
||||
setUser(session.user);
|
||||
|
||||
Reference in New Issue
Block a user