-
Notifications
You must be signed in to change notification settings - Fork 2.8k
fix: head to home console error from error page #2304
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
Conversation
|
Beep boop! 🤖 Hey @strongSoda, thanks for your PR! One of my human friends will review this PR and get back to you as soon as possible. 🕐 Stay awesome! 😎 |
|
Deploy preview for hasura-docs ready! Built with commit be6c40d |
|
Review app for commit bcb6bac deployed to Heroku: https://hge-ci-pull-2304.herokuapp.com |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@strongSoda using window.location.replace causes a hard refresh to happen (refetch of all state data again). To avoid that we use the <Link> react component to do routing.
Instead
- create a func called
resetStatewhich doesthis.setState({ hasError: false, info: null, error: null }) - add an
onClick={resetState}to theLink - replace other places in the file that are doing the same thing with
resetState(line 25)
|
doing this renders the 404 page after clicking on home link. |
|
Review app for commit 089c882 deployed to Heroku: https://hge-ci-pull-2304.herokuapp.com |
|
Review app https://hge-ci-pull-2304.herokuapp.com is deleted |
|
Beep boop! 🤖 Whoa! 🎉 🎉 💃 Awesome work @strongSoda! 💪 🏆 All of us at Hasura ❤️ what you did. Thanks again 🤗 |
Affected components