diff --git a/client/modules/IDE/pages/MobileIDEView.jsx b/client/modules/IDE/pages/MobileIDEView.jsx index ac73644d..2aa653b2 100644 --- a/client/modules/IDE/pages/MobileIDEView.jsx +++ b/client/modules/IDE/pages/MobileIDEView.jsx @@ -75,7 +75,6 @@ const isUserOwner = ({ project, user }) => // TODO: This could go into const handleGlobalKeydown = (props, cmController) => (e) => { - alert('haha'); const { user, project, ide, setAllAccessibleOutput, diff --git a/client/utils/custom-hooks.js b/client/utils/custom-hooks.js index cf6c0130..7543555c 100644 --- a/client/utils/custom-hooks.js +++ b/client/utils/custom-hooks.js @@ -55,5 +55,5 @@ export const useEffectWithComparison = (fn, props) => { export const useEventListener = (event, callback, useCapture = false) => useEffect(() => { document.addEventListener(event, callback, useCapture); - return document.removeEventListener(event, callback, useCapture); + return () => document.removeEventListener(event, callback, useCapture); }, []);