Add logging message to check if username is longer than 4 characters

This commit is contained in:
Ray 2023-09-12 10:32:32 +00:00 committed by GitHub
parent 2407336ea4
commit bb2ed39cd8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 12 additions and 1 deletions

View File

@ -14,6 +14,12 @@ export function Signup ( props ) {
evt.preventDefault()
}
useEffect( () => {
if(username.length > 4) {
console.log("longer than 4 characters")
}
}
)
return (
@ -23,7 +29,12 @@ export function Signup ( props ) {
<Form>
<Form.Group>
<Form.Label>Username</Form.Label>
<Form.Control type="text" name="username" placeholder='username'/>
<Form.Control
type="text"
name="username"
placeholder='username'
onChange={ (evt) => setUsername(evt.target.value) }
/>
</Form.Group>
<Form.Group>
<Form.Label>Email</Form.Label>