File tree 1 file changed +22
-3
lines changed
src/containers/FormForgot
1 file changed +22
-3
lines changed Original file line number Diff line number Diff line change @@ -7,19 +7,38 @@ import ButtonCollab from "../../components/ButtonCollab";
7
7
import FormAuth from "../../containers/FormAuth" ;
8
8
import LabelCollab from "../../components/LabelCollab" ;
9
9
10
+ import useValidation from "../../libs/validation/useValidation" ;
11
+ import validation from "./validation" ;
12
+
10
13
function FormForgot ( ) {
14
+ const { value, handleChange, handleSubmit, errors } = useValidation (
15
+ validation ,
16
+ sendFormForgot ,
17
+ "email"
18
+ ) ;
19
+
20
+ function sendFormForgot ( ) { }
21
+
11
22
return (
12
- < FormAuth >
23
+ < FormAuth noValidate onSubmit = { handleSubmit } >
13
24
< TitleCollab content = "Esqueci minha senha" />
14
25
15
26
< LabelCollab
16
27
content = "Informe seu e-mail para alterar a sua senha"
17
28
warning = { true }
18
29
/>
19
30
20
- < FieldCollab content = "E-mail:" htmlFor = "email" id = "email" />
31
+ < FieldCollab
32
+ content = "E-mail:"
33
+ htmlFor = "email"
34
+ id = "email"
35
+ name = "email"
36
+ value = { value . email }
37
+ msgError = { errors . email }
38
+ onChange = { handleChange }
39
+ />
21
40
22
- < ButtonCollab content = "Enviar" to = "/dashboard" />
41
+ < ButtonCollab content = "Enviar" to = "/dashboard" as = "button" />
23
42
</ FormAuth >
24
43
) ;
25
44
}
You can’t perform that action at this time.
0 commit comments