I have a button that needs to programatically change routes using the push method of useRouter from next/navigation. On soft navigation using the back button in Chrome works fine, but on hard navigation using the back button makes the site unresponsive, uses 100% cpu, and closing the tab doesn't work. I have to force quit Chrome.
I've completely removed any middleware that may have been affecting navigation. I also found some old github issues from years ago with similar issues, but couldn't find any solutions in them.
Could someone please take a peak at my very simple codebase using the app router? https://github.com/bztravis88/gifgrams An example of the back button working with router.push is in the AuthToggle component which switches between the signin and signup routes. An example of a router.push that has this issue is a hard navigation from / to /account
This is my first major project using next js, so I may be misusing things, would appreciate any help! :)
The issue was that you cannot define a page.js with a client component that is an async function.