diff --git a/web/src/layout/AuthLayout.tsx b/web/src/layout/AuthLayout.tsx index bb1dce4..7b4114d 100644 --- a/web/src/layout/AuthLayout.tsx +++ b/web/src/layout/AuthLayout.tsx @@ -16,7 +16,7 @@ const AuthLayout = () => { const hasAccounts = useAuth((state) => state.accounts.length > 0); const fetchingProfile = useAuth((state) => state.authenticating); - const fetchProfile = useAuth((state) => state.authenticate); + const authenticate = useAuth((state) => state.authenticate); const signInRequired = useAuth((state) => state.signInRequired); @@ -59,9 +59,9 @@ const AuthLayout = () => { useEffect(() => { if (dbConnected && !loadingAccounts && activeAccount) { - fetchProfile(); + authenticate(); } - }, [activeAccount, dbConnected, fetchProfile, loadingAccounts]); + }, [activeAccount, dbConnected, authenticate, loadingAccounts]); useEffect(() => { if (!signInRequired && location.state?.from) {