diff --git a/autogpt_platform/frontend/src/app/login/page.tsx b/autogpt_platform/frontend/src/app/login/page.tsx index 797c8ad85e..629854c4d5 100644 --- a/autogpt_platform/frontend/src/app/login/page.tsx +++ b/autogpt_platform/frontend/src/app/login/page.tsx @@ -26,6 +26,7 @@ import { PasswordInput, } from "@/components/auth"; import { loginFormSchema } from "@/types/auth"; +import { getBehaveAs } from "@/lib/utils"; export default function LoginPage() { const { supabase, user, isUserLoading } = useSupabase(); @@ -147,7 +148,11 @@ export default function LoginPage() { Login - + Update password - + ) : ( @@ -178,7 +183,11 @@ export default function ResetPasswordPage() { > Send reset email - + )} diff --git a/autogpt_platform/frontend/src/app/signup/page.tsx b/autogpt_platform/frontend/src/app/signup/page.tsx index 7268f1ff33..10b59b5c9f 100644 --- a/autogpt_platform/frontend/src/app/signup/page.tsx +++ b/autogpt_platform/frontend/src/app/signup/page.tsx @@ -36,7 +36,6 @@ export default function SignupPage() { const router = useRouter(); const [isLoading, setIsLoading] = useState(false); //TODO: Remove after closed beta - const [showErrorPrompt, setShowErrorPrompt] = useState(false); const form = useForm>({ resolver: zodResolver(signupFormSchema), @@ -64,13 +63,11 @@ export default function SignupPage() { setFeedback("User with this email already exists"); return; } else { - setShowErrorPrompt(true); setFeedback(error); } return; } setFeedback(null); - setShowErrorPrompt(false); }, [form], ); @@ -193,7 +190,6 @@ export default function SignupPage() { diff --git a/autogpt_platform/frontend/src/components/auth/AuthFeedback.tsx b/autogpt_platform/frontend/src/components/auth/AuthFeedback.tsx index 98d808ff8e..835ed118dd 100644 --- a/autogpt_platform/frontend/src/components/auth/AuthFeedback.tsx +++ b/autogpt_platform/frontend/src/components/auth/AuthFeedback.tsx @@ -7,14 +7,12 @@ import { BehaveAs } from "@/lib/utils"; interface Props { message?: string | null; isError?: boolean; - showErrorPrompt?: boolean; behaveAs?: BehaveAs; } export default function AuthFeedback({ message = "", isError = false, - showErrorPrompt = false, behaveAs = BehaveAs.CLOUD, }: Props) { // If there's no message but isError is true, show a default error message @@ -41,7 +39,7 @@ export default function AuthFeedback({ )} {/* Cloud-specific help */} - {showErrorPrompt && behaveAs === BehaveAs.CLOUD && ( + {isError && behaveAs === BehaveAs.CLOUD && (
The provided email may not be allowed to sign up. @@ -85,7 +83,7 @@ export default function AuthFeedback({ )} {/* Local-specific help */} - {showErrorPrompt && behaveAs === BehaveAs.LOCAL && ( + {isError && behaveAs === BehaveAs.LOCAL && (