Custom hook that prevents users from navigating away from the page when there are unsaved changes. It prompts users with a confirmation dialog before leaving the page.
usePageLeaveConfirmation(); Copy
usePageLeaveConfirmation();
Custom hook that prevents users from navigating away from the page when there are unsaved changes. It prompts users with a confirmation dialog before leaving the page.