i am making a validation form , with a function that checks for password and email , if true it should navigate to a separate website (not to a path within the web). But it is not working
This is my code below:
function validate() {
if (email==='123@123.com' && password==="123456"){
console.log(email);
history('http://www.dummy.com/webmail')
}
}
return{
.
.
.
<Button className={stylesAuth.submitButton} variant="warning" onClick={validate}>
}
How should I do so?
Aucun commentaire:
Enregistrer un commentaire