react-hooks-jwt-auth icon indicating copy to clipboard operation
react-hooks-jwt-auth copied to clipboard

Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'push') at Login.js:48:1

Open Crazyhead90 opened this issue 4 years ago • 2 comments

I'm getting an error at:

Login.js:48 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'push')
    at Login.js:48:1

What am i doing wrong? I literally copied the code from this github.

Due to this error my Login page is not redirecting to the /profile page and keeps stuck at "logging in". Manually refreshing the page or going to home does show that it is logged in though.

https://github.com/bezkoder/react-hooks-jwt-auth/blob/d3729dc7187d3376586822d86d685ce562d599fd/src/components/Login.js#L48

Crazyhead90 avatar Feb 08 '22 20:02 Crazyhead90

It seems to be something with react-router-dom version 6

Crazyhead90 avatar Feb 08 '22 21:02 Crazyhead90

#18 a fix for the login redirection

Crazyhead90 avatar Feb 08 '22 22:02 Crazyhead90