diff --git a/components/home.js b/components/home.js index 6c3b7e8f..7065f04b 100644 --- a/components/home.js +++ b/components/home.js @@ -161,16 +161,17 @@ export default function Home({ }) { } }, [JSON.stringify(mainSession), inCrazyGames]) - useEffect(() => { - window.onbeforeunload = function(e) { - if(screen === "home") { + // this breaks stuff like logout and set username reloads + // useEffect(() => { + // window.onbeforeunload = function(e) { + // if(screen === "home") { - } else { - e.preventDefault(); - return e.returnValue = 'Are you sure you want to leave?'; - } - } - }, [screen]) + // } else { + // e.preventDefault(); + // return e.returnValue = 'Are you sure you want to leave?'; + // } + // } + // }, [screen])