Consider onboarding_complete flag when exposing profileComplete

cgen-ce39d5ea04a946e797ff76a0e31ca431
This commit is contained in:
Builder.io 2025-09-28 06:35:41 +00:00
parent 5b880d5be3
commit d0e94523ad

View file

@ -264,13 +264,18 @@ export const AuthProvider: React.FC<{ children: React.ReactNode }> = ({
if (user?.id) await fetchUserProfile(user.id);
};
const computedComplete =
checkProfileComplete(profile) ||
(typeof window !== "undefined" &&
window.localStorage.getItem("onboarding_complete") === "1");
const value = {
user,
profile,
roles,
session,
loading,
profileComplete: checkProfileComplete(profile),
profileComplete: computedComplete,
signIn,
signUp,
signInWithOAuth,