#Block/Confirm Navigation TO A PAGE

3 messages · Page 1 of 1 (latest)

cerulean escarp
#

I'm using file-based-routing and I have a requirement to show a confirmation modal every time a navigation attempt is made TO a specific page (suppose '/users'). The users page should not even load unless user clicks 'proceed' in the modal. If user clicks 'cancel' he should remain where he was (navigation wise).
I tired beforeload / loader functions in the createFileRoute function, but couldn't find the exact setup that would work. Ideas? Thanks

bright rampart
cerulean escarp
#

As far as I can tell this helps with navigating AWAY from a page. I need to capture an attempt of navigation TO a page