Add helpers to activate and deactivate warning

This commit is contained in:
Elijah Mock 2024-01-06 21:49:29 +00:00
parent ccaf7b0279
commit dd5d1b9cba
No known key found for this signature in database
GPG Key ID: CA7DE639741E50C4

View File

@ -0,0 +1,7 @@
export const activateNavigationWarning = () => {
window.onbeforeunload = () => true;
}
export const deactivateNavigationWarning = () => {
window.onbeforeunload = null;
}