Guarantee loading is false - add catch-all timeout

cgen-dd485462dbf14ff18179816ae9b214e8
This commit is contained in:
Builder.io 2025-11-08 09:21:56 +00:00
parent ed1318b249
commit 0f927576e4

View file

@ -873,8 +873,12 @@ export const AuthProvider: React.FC<{ children: React.ReactNode }> = ({
});
}
// Ensure loading is always false after sign-out completes
// CRITICAL: Guarantee loading is false so buttons appear
// Use synchronous call first, then timeout to catch any edge cases
setLoading(false);
setTimeout(() => {
setLoading(false);
}, 100);
};
const updateProfile = async (updates: Partial<AethexUserProfile>) => {