File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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+ }
You can’t perform that action at this time.
0 commit comments