diff --git a/ui/component/app/view.jsx b/ui/component/app/view.jsx index 3c84db9ea..cd6c65c8a 100644 --- a/ui/component/app/view.jsx +++ b/ui/component/app/view.jsx @@ -21,9 +21,6 @@ import usePersistedState from 'effects/use-persisted-state'; import Spinner from 'component/spinner'; import LANGUAGES from 'constants/languages'; -// @if TARGET='app' -import useHistoryNav from 'effects/use-history-nav'; -// @endif // @if TARGET='web' import YoutubeWelcome from 'web/component/youtubeReferralWelcome'; import { @@ -235,11 +232,6 @@ function App(props: Props) { return () => window.removeEventListener('keydown', handleKeyPress); }, []); - // Enable 'Alt + Left/Right' for history navigation on Desktop. - // @if TARGET='app' - useHistoryNav(history); - // @endif - useEffect(() => { if (referredRewardAvailable && sanitizedReferrerParam && isRewardApproved) { setReferrer(sanitizedReferrerParam, true); diff --git a/ui/effects/use-history-nav.js b/ui/effects/use-history-nav.js deleted file mode 100644 index aa82b4077..000000000 --- a/ui/effects/use-history-nav.js +++ /dev/null @@ -1,25 +0,0 @@ -import { useEffect } from 'react'; - -export default function useHistoryNav(history) { - useEffect(() => { - const handleKeyPress = e => { - if ((e.metaKey || e.altKey) && !e.ctrlKey && !e.shiftKey) { - switch (e.code) { - case 'ArrowLeft': - e.preventDefault(); - history.goBack(); - break; - case 'ArrowRight': - e.preventDefault(); - history.goForward(); - break; - default: - // Do nothing - break; - } - } - }; - window.addEventListener('keydown', handleKeyPress); - return () => window.removeEventListener('keydown', handleKeyPress); - }, []); -}