Orcasa-Platform / orcasa

A Horizon Europe project to restore soil earth
https://orcasa-client.vercel.app
MIT License
2 stars 0 forks source link

Add confirm alert when form is dirty and user tries to leave #216

Closed Bluesmile82 closed 8 months ago

Bluesmile82 commented 8 months ago

https://vizzuality.atlassian.net/browse/ORC-395?atlOrigin=eyJpIjoiMjdjYjY2MWNhZWNiNGZiZWJiYjlkYWU1ZTMxNGQ1MTgiLCJwIjoiaiJ9

This PR makes the user confirm if it leaves the page with an empty form. Due to the discontinued events on the router on Next and waiting for a upcoming solution I had to use a custom hook for the beforeUnload

vercel[bot] commented 8 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
orcasa-client ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 22, 2024 1:53pm