diff --git a/src/App.js b/src/App.js index 7ecaf96..ee5ed53 100644 --- a/src/App.js +++ b/src/App.js @@ -24,6 +24,11 @@ export default function App() { useLayoutEffect(() => { + window.addEventListener("beforeunload", e => { + e.preventDefault() + e.returnValue = "" + }) + canvas = document.getElementById("canvas") context = canvas.getContext("2d")