-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathForgotPassword.tsx
36 lines (31 loc) · 1.11 KB
/
ForgotPassword.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import React, { useState } from "react";
import { Card } from "antd";
import SendVerificationCodeForm from "./SendVerificationCodeForm";
import EnterVerificationCodeForm from "./EnterVerificationCodeForm";
import SetNewPasswordForm from "./SetNewPasswordForm";
import styles from "./ForgotPassword.module.scss";
const ForgotPassword: React.FC = () => {
const [codeInputVisible, setCodeInputVisible] = useState(false);
const [isVerified, setIsVerified] = useState(false);
const [email, setEmail] = useState("");
return (
<Card title="Forgot Password" className={styles.form}>
{!codeInputVisible && !isVerified && (
<SendVerificationCodeForm
codeInputVisible={codeInputVisible}
setCodeInputVisible={setCodeInputVisible}
setEmail={setEmail}
/>
)}
{codeInputVisible && !isVerified && (
<EnterVerificationCodeForm
isVerified={isVerified}
setIsVerified={setIsVerified}
email={email}
/>
)}
{isVerified && <SetNewPasswordForm isVerified={isVerified} />}
</Card>
);
};
export default ForgotPassword;