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.
|
props.history.push("/profile"); |