From 6eced231121399d77694120c9956c6bef783fb54 Mon Sep 17 00:00:00 2001 From: PhilReact Date: Sun, 22 Sep 2024 15:16:36 +0300 Subject: [PATCH] remove exit confirmation for mobile --- src/App.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/App.tsx b/src/App.tsx index d018d6b..abf39b1 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1039,10 +1039,11 @@ function App() { // }, []) useEffect(() => { - if (!isMainWindow) return; + if (!isMainWindow || isMobile) return; const handleBeforeUnload = (e) => { e.preventDefault(); e.returnValue = ""; // This is required for Chrome to display the confirmation dialog. + return ""; }; // Add the event listener when the component mounts