score:1

import { useHistory } from 'react-router-dom';


export default function Login() {

   const classes = useStyles();
   const loginHandler(){
       // handle your login logic
       history.push('/help'); // use either relative or absolute path both will work,navigate to help page or wherever want to navigate
   };

   return (
       <div>
            <TextField id="email" label="Enter email" />
            <TextField id="password" label="Enter password" />
            <button onClick={loginHandler}>Login</button>
       </div>
   );
}

score:1

import React from 'react';
import Button from '@material-ui/core/Button';
import Box from '@material-ui/core/Box';
import { Link } from "react-router-dom"; 
//^this import is important

...

<Button component={Link} to='/login' variant="contained" color="primary" className={classes.loginButton}>
Login
</Button>

Related Query

More Query from same tag