Login and dashboard added
This commit is contained in:
32
components/auth/authCard.tsx
Normal file
32
components/auth/authCard.tsx
Normal file
@@ -0,0 +1,32 @@
|
||||
"use client";
|
||||
|
||||
import { useState } from "react";
|
||||
import LoginForm from "./loginForm";
|
||||
import VerifyCode from "./verifyCode";
|
||||
import ForgotPassword from "./forgetPassword";
|
||||
import {Step} from "@/constants/types"
|
||||
|
||||
|
||||
|
||||
export default function AuthCard() {
|
||||
const [step, setStep] = useState<Step>("login");
|
||||
|
||||
return (
|
||||
<>
|
||||
{step === "login" && (
|
||||
<LoginForm
|
||||
onSuccess={() => setStep("verify")}
|
||||
onForgotPassword={() => setStep("forgot")}
|
||||
/>
|
||||
)}
|
||||
|
||||
{step === "verify" && (
|
||||
<VerifyCode onBack={() => setStep("login")} />
|
||||
)}
|
||||
|
||||
{step === "forgot" && (
|
||||
<ForgotPassword onBack={() => setStep("login")} />
|
||||
)}
|
||||
</>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user