fix: also guard onAuthStateChange callback with active flag
This commit is contained in:
@@ -16,7 +16,7 @@ export function useAuth() {
|
||||
});
|
||||
|
||||
const { data: { subscription } } = supabase.auth.onAuthStateChange((_event, session) => {
|
||||
setSession(session);
|
||||
if (active) setSession(session);
|
||||
});
|
||||
|
||||
return () => {
|
||||
|
||||
Reference in New Issue
Block a user