react-hooks-jwt-auth
react-hooks-jwt-auth copied to clipboard
Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'push') at Login.js:48:1
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
It seems to be something with react-router-dom version 6