mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-21 17:31:12 -05:00
Fix: Synchronize loading state for initial session
This commit is contained in:
@@ -199,6 +199,8 @@ function AuthProviderComponent({ children }: { children: React.ReactNode }) {
|
||||
setSession(session);
|
||||
setUser(session.user);
|
||||
sessionVerifiedRef.current = true;
|
||||
// Keep loading true until profile is fetched (same as SIGNED_IN)
|
||||
setLoading(true);
|
||||
} else {
|
||||
authLog('[Auth] INITIAL_SESSION with no user - setting loading to false');
|
||||
setSession(null);
|
||||
|
||||
Reference in New Issue
Block a user