How can I use Navigate in Rickett version 6?

13 views Asked by At

I want to check if the token exists. If there is no token, I redirect the user to the login page Because I use the hook, the useNavigate command gives an error, as well as the command history.push( (https://i.stack.imgur.com/sCxM9.png) (https://i.stack.imgur.com/XOcHo.png)

action.props.history.push('/') dont work

0

There are 0 answers