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:
pacnpal
2025-10-12 11:45:13 -04:00
parent f294020d0b
commit 0a9b163e81
3 changed files with 1092 additions and 1505 deletions

View File

@@ -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);