@@ -2,20 +2,17 @@ import React, { useRef, useCallback, useState } from 'react';
22import { useParams } from 'react-router-dom' ;
33import * as Yup from 'yup' ;
44
5- import { Form } from '@unform/web' ;
65import { FormHandles } from '@unform/core' ;
76
87import { useAuth } from 'contexts/auth' ;
98import { getInviteInfo } from 'services/auth' ;
9+ import FormUpdate from 'components/FormUpdate' ;
1010
1111import LogoIcon from 'assets/logo.svg' ;
12- import InputForm from 'components/InputForm' ;
13- import Button from 'components/Button/Button' ;
1412
1513import getValidationErrors from 'utils/getValidationErrors' ;
1614import registerSchemaValidation from 'utils/registerSchemaValidation' ;
1715
18- import Input from 'components/Input/Input' ;
1916import RegisterModal from './components/RegisterModal' ;
2017
2118import StyledRegisterNewUser from './styles' ;
@@ -71,41 +68,12 @@ const RegisterNewUser = () => {
7168 </ a >
7269
7370 < div className = "RegisterNewUser" >
74- < Form onSubmit = { handleSubmit } ref = { formRef } className = "Content" >
75- < div className = "inputContent" >
76- < InputForm
77- name = "name"
78- title = "Nome completo"
79- defaultValue = { inviteInfo ?. name }
80- />
81-
82- < InputForm name = "office" title = "Título / Cargo" />
83-
84- < InputForm name = "area" title = "Área" />
85-
86- < InputForm name = "company" title = "Empresa" />
87-
88- < Input
89- name = "email"
90- title = "E-mail"
91- styleWidth = "40rem"
92- defaultValue = { inviteInfo ?. email || '' }
93- readOnly = { ! ! inviteInfo ?. email }
94- />
95-
96- < InputForm name = "phone" title = "Telefone" />
97-
98- < InputForm name = "password" title = "Senha" type = "password" />
99-
100- < InputForm
101- name = "password_confirmation"
102- title = "Confirme a senha"
103- type = "password"
104- />
105- </ div >
106-
107- < Button color = "var(--green)" > Cadastrar</ Button >
108- </ Form >
71+ < FormUpdate
72+ formRef = { formRef }
73+ hasPasswordField
74+ inviteInfo = { inviteInfo }
75+ handleSubmit = { handleSubmit }
76+ />
10977 </ div >
11078 </ StyledRegisterNewUser >
11179 </ >
0 commit comments