const navGuard = useNavigationGuard({
enabled: isStarted,
});
return (
<>
<ResponsiveDialog
open={navGuard.active}
description={
'Opuszczenie strony spowoduje utratę dotychczasowego dostępu!'
}
footer={{
cancel: <Button onClick={navGuard.reject}>Anuluj</Button>,
submit: <Button onClick={navGuard.accept}>Anuluj</Button>,
}}
/>
but the dialog never shows and always the default browser popup is shown. How to fix that? I want to make a callack to my database before user left the page.
I have a code like this:
but the dialog never shows and always the default browser popup is shown. How to fix that? I want to make a callack to my database before user left the page.