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
Fix the prompt dialog button #528
Comments
|
I can work on this issue. |
|
I suppose It should throw a prompt message when the user tries to navigate to another link, while writing a post ? |
|
Yes it's working on the production site at the moment in case you want to see it. This is when you are logged in and try to create an article (https://www.codu.co/create) There is autosave functionality, but if the user is about to navigate away they see the modal in the screenshot. |
|
Thanks for that! I've been opening issues for fixing this stuff so I'll add it to the pile of issues to pick up. And since the change to the /app router we now use the next package called "next/navigation" which doesn't have the same hooks as before (and that's what caused it to break). |
|
@Joseph2001-braganza let me know if you are tackling this or if I should release it. 🦾 Thanks! |
|
I was looking out for some potential solutions for this but couldn't find one.I guess due to the new version the Next Js team is developing it and still under development as per the github issue thread of Next Js. |
|
Dang! This newest version of next has thrown some issues... 😢 |
|
@NiallJoeMaher Can I have a look? I'm not sure there's a workaround for it |
|
All yours @seog-jun! I have no idea yet. |
|
@NiallJoeMaher Huh.. there's no simple workaround here.. even version 14 doesn't come with |


Context
We have a component used in to catch unsaved changes on an article so a user doesn't accidentally navigate away.
It is commented out at the moment because since Next.js version 13 (and the app router) it no longer behaves as expected.
Expected Behavior
Fix the PromptService component (components/PromptService/PromptService.tsx) so that it works in the new app router.
When it is complete we should be able to add them back into the editor so the user is warned if they are about to navigate away.
Current Behavior
It's totally broken. 🙃
The text was updated successfully, but these errors were encountered: