mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-21 22:31:13 -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);
|
setSession(session);
|
||||||
setUser(session.user);
|
setUser(session.user);
|
||||||
sessionVerifiedRef.current = true;
|
sessionVerifiedRef.current = true;
|
||||||
|
// Keep loading true until profile is fetched (same as SIGNED_IN)
|
||||||
|
setLoading(true);
|
||||||
} else {
|
} else {
|
||||||
authLog('[Auth] INITIAL_SESSION with no user - setting loading to false');
|
authLog('[Auth] INITIAL_SESSION with no user - setting loading to false');
|
||||||
setSession(null);
|
setSession(null);
|
||||||
|
|||||||
Reference in New Issue
Block a user