fix: also guard onAuthStateChange callback with active flag

This commit is contained in:
2026-05-07 20:11:59 +03:00
parent f6b66efd02
commit 713eee7912
+1 -1
View File
@@ -16,7 +16,7 @@ export function useAuth() {
});
const { data: { subscription } } = supabase.auth.onAuthStateChange((_event, session) => {
setSession(session);
if (active) setSession(session);
});
return () => {