Add second check of disabling button unless conditions met

This commit is contained in:
Ray 2023-09-12 10:55:37 +00:00 committed by GitHub
parent 76113ace96
commit fcdc2339d7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 1 deletions

View File

@ -76,7 +76,12 @@ export function Signup ( props ) {
onChange={ (evt) => setUserpassword(evt.target.value) } onChange={ (evt) => setUserpassword(evt.target.value) }
/> />
</Form.Group> </Form.Group>
<Button variant="primary" className="mt-3 w-100" type="submit">Sign up</Button> <Button
variant="primary"
className="mt-3 w-100"
type="submit">Sign up
disabled={ !(validemail && validpassword && validusername) ? false : true }
</Button>
</Form> </Form>
</Col> </Col>
</Row> </Row>