Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
Crazyhead90 opened this issue Feb 8, 2022 · 2 comments

Comments

@Crazyhead90
Copy link

Crazyhead90 commented Feb 8, 2022

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");

@Crazyhead90
Copy link
Author

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

@Crazyhead90
Copy link
Author

Crazyhead90 commented Feb 8, 2022

#18 a fix for the login redirection

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant