Skip to content

Commit 0a127e6

Browse files
committed
Implement ResetPassword
1 parent 7020402 commit 0a127e6

2 files changed

Lines changed: 45 additions & 0 deletions

File tree

src/ResetPassword/resetPassword.js

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
import AccountForm from "../AccountForm/accountForm";
2+
import accountForm from "../AccountForm/accountForm.module.css";
3+
import Layout from "../Layout/layout";
4+
import FormField from "../FormField/formField";
5+
import { useState } from "react";
6+
7+
export default function ResetPassword(props) {
8+
const [newPassword, setNewPassword] = useState("");
9+
const [confirmNewPassword, setConfirmNewPassword] = useState("");
10+
11+
const handleNewPasswordChange = e => {
12+
setNewPassword(e.target.value);
13+
};
14+
15+
const handleConfirmNewPasswordChange = e => {
16+
setConfirmNewPassword(e.target.value);
17+
};
18+
19+
return (
20+
<Layout>
21+
<AccountForm heading="Reset your Password">
22+
<FormField
23+
autofocus
24+
label="newpass"
25+
labelContent="New Password"
26+
format="password"
27+
required
28+
value={newPassword}
29+
onChange={handleNewPasswordChange}
30+
/>
31+
<FormField
32+
label="confirmpass"
33+
labelContent="Confirm Password"
34+
format="password"
35+
required
36+
value={confirmNewPassword}
37+
onChange={handleConfirmNewPasswordChange}
38+
/>
39+
<button type="submit" className={accountForm.card}>
40+
Reset your Password
41+
</button>
42+
</AccountForm>
43+
</Layout>
44+
);
45+
}

src/ResetPassword/resetPassword.module.css

Whitespace-only changes.

0 commit comments

Comments
 (0)