-
Notifications
You must be signed in to change notification settings - Fork 27.7k
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
Router.push('/') is not routing back to my page/index.js file. #8624
Comments
Hi, are you using |
OMG thanks! I believe I'm calling the css file from _app. But I'll research the referenced issue and investigate my code thoroughly. Please allow me a few hours to close this out myself and document accordingly. 🙏🏽 |
If you're using next-css it's definitely the same as vercel/next-plugins#282 So I'll close this issue and we're already tracking it there. |
Dude do you have OCD with closing issues? I just asked for a little time to verify that this was indeed the issue, you closed this without verifying anything.... |
https://github.com/zeit/next.js/blob/canary/CODE_OF_CONDUCT.md Specifically:
This falls under This is not a bug in Next.js itself. It's a problem in webpack and there's 2 open issues as @ijjk outlined. So there is no reason to keep this issue open. It's already on the roadmap to be fixed, see #8626 This issue by itself is not reproducible based on the steps provided. |
I fixed it with |
This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
Bug report
Describe the bug
Simple javascript function to Router.push("/") will not work correctly.
in
_app.js
has:which is working...
in my AppBar(Material-ui Toolbar) i have a simple onClick (i've also tried with
<Link>
to no avail)To Reproduce
Steps to reproduce the behavior, please provide code snippets or a repository:
Create a new
<Link>
with href to"/"
....see if it redirects to your homepage from another page.or
Create a new element with an onChange parameter.
onChange={Router.push("/")}
and see if it redirects to home page from another page.The current page will stay rendered, however the
routeChangeStart
callback will fire...Expected behavior
I expect the home page (index.js) to be rendered within a few seconds of calling
Router.push
or clicking a<Link>
withhref="/"
Screenshots
image of the
routeChangeStart
consoling out in_app.js
System information
"next": "^9.0.5"
Additional context
Reopening from #5264 .
Thank you!
The text was updated successfully, but these errors were encountered: