Skip to content

Commit 351c08d

Browse files
CedarCooperSbethmtiffanynchaujackyuan1DrewManley
committed
Updated SignUp types
Co-authored-by: Sarah Moosa <[email protected]> Co-authored-by: Tiffany Chau <[email protected]> Co-authored-by: Jack Yuan <[email protected]> Co-authored-by: Cedar Cooper <[email protected]> Co-authored-by: Drew Manley <[email protected]>
1 parent 04359b5 commit 351c08d

File tree

1 file changed

+5
-23
lines changed

1 file changed

+5
-23
lines changed

src/components/SignUp.tsx

Lines changed: 5 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ const SignUp = () => {
5151
className='settingsForm'
5252
component= 'form'
5353
autoComplete= 'off'
54-
onSubmit={(e) => handleNewUser(e)}
54+
onSubmit={(e: any) => handleNewUser(e, e.target.roleID)}
5555
sx={{color:'blue'}}
5656
>
5757

@@ -83,7 +83,7 @@ const SignUp = () => {
8383
id="signupPassword"
8484
type={values.showPassword ? 'text' : 'password'}
8585
onChange={(e)=>{
86-
checkPasswordLength(e);
86+
checkPasswordLength();
8787
setValues({...values, password:e.target.value})
8888
}}
8989
endAdornment={
@@ -104,25 +104,6 @@ const SignUp = () => {
104104
{values.password && <PasswordStrengthBar style={{maxWidth:'190px', color:'red',marginLeft:10 }} password= {values.password}/>}
105105
<span id='password-length-alert' style={{fontSize:10, textAlign:'left', maxWidth:190, display:'inline-block', marginLeft:10}}></span>
106106

107-
{/* <TextField
108-
id='signupPassword'
109-
label='Password'
110-
variant='outlined'
111-
type='password'
112-
required
113-
inputProps={{ minLength: 6, maxLength: 16 }}
114-
115-
onChange={(e) => {
116-
setPassword(e.target.value);
117-
checkPasswordLength(e);}}
118-
sx={{
119-
m: 1
120-
}}
121-
/> */}
122-
123-
{/* {password && <PasswordStrengthBar style={{maxWidth:'190px', color:'red',marginLeft:10 }} password= {password}/>}
124-
<span id='password-length-alert' style={{fontSize:10, textAlign:'left', maxWidth:190, display:'inline-block', marginLeft:10}}></span> */}
125-
126107
<br />
127108
<TextField
128109
id='signupPasswordConfirmation'
@@ -132,7 +113,7 @@ const SignUp = () => {
132113
required
133114
onChange={(e) => {
134115
setValues({...values, passwordConfirmation:e.target.value})
135-
confirmPassword(e)
116+
confirmPassword()
136117
}}
137118
sx={{
138119
m: 1
@@ -150,7 +131,8 @@ const SignUp = () => {
150131
inputProps={{maxLength: 12 }}
151132

152133
onChange={() => {
153-
checkPhone(document.getElementById('signupPhone')?.value);
134+
const inputElement =(document.getElementById('signupPhone') as HTMLInputElement).value;
135+
checkPhone(inputElement)
154136
}}
155137
sx={{
156138
m: 1

0 commit comments

Comments
 (0)