diff --git a/app/auth/page-1.tsx b/app/auth/page-1.tsx deleted file mode 100644 index dad6236..0000000 --- a/app/auth/page-1.tsx +++ /dev/null @@ -1,6 +0,0 @@ -import Login from "@/components/form/login"; -import React from "react"; - -export default function AuthPage() { - return <>{/* */}; -} diff --git a/app/auth/page.tsx b/app/auth/page.tsx index c5586d7..ced7412 100644 --- a/app/auth/page.tsx +++ b/app/auth/page.tsx @@ -11,7 +11,13 @@ import { toast } from "sonner"; type AuthStep = "login" | "email-setup" | "otp"; -const AuthPage = ({ params: { locale } }: { params: { locale: string } }) => { +type PageProps = { + params: { + locale: string; + }; +}; + +const AuthPage = ({ params: { locale } }: PageProps) => { const [currentStep, setCurrentStep] = useState("login"); const [loginCredentials, setLoginCredentials] = useState(null); @@ -20,7 +26,6 @@ const AuthPage = ({ params: { locale } }: { params: { locale: string } }) => { const handleLoginSuccess = async (data: LoginFormData) => { setLoginCredentials(data); - // Check email validation to determine next step try { const result = await validateEmail(data); switch (result) { @@ -34,7 +39,7 @@ const AuthPage = ({ params: { locale } }: { params: { locale: string } }) => { setCurrentStep("otp"); break; case "success": - // The login hook will handle navigation automatically + // Already handled break; default: toast.error("Unexpected response from email validation"); @@ -64,7 +69,6 @@ const AuthPage = ({ params: { locale } }: { params: { locale: string } }) => { if (loginCredentials) { try { await login(loginCredentials); - // Navigation handled by login } catch (error: any) { toast.error(error.message || "Login failed after OTP verification"); }