diff --git a/src/components/ErrorBoundaryFallback.tsx b/src/components/ErrorBoundaryFallback.tsx index 02b122f..0014b13 100644 --- a/src/components/ErrorBoundaryFallback.tsx +++ b/src/components/ErrorBoundaryFallback.tsx @@ -1,7 +1,5 @@ -import { useNavigate } from "@solidjs/router"; import { createSignal, onCleanup, onMount } from "solid-js"; import { TerminalErrorPage } from "~/components/TerminalErrorPage"; -import { useDarkMode } from "~/context/darkMode"; import { glitchText } from "~/lib/client-utils"; export interface ErrorBoundaryFallbackProps { @@ -12,23 +10,6 @@ export interface ErrorBoundaryFallbackProps { export default function ErrorBoundaryFallback( props: ErrorBoundaryFallbackProps ) { - let navigate: ((path: string) => void) | undefined; - try { - navigate = useNavigate(); - } catch (e) { - navigate = (path: string) => { - window.location.href = path; - }; - } - - let isDark: () => boolean; - try { - const darkMode = useDarkMode(); - isDark = darkMode.isDark; - } catch (e) { - isDark = () => true; - } - const [glitchError, setGlitchError] = createSignal("ERROR"); onMount(() => { @@ -83,12 +64,10 @@ export default function ErrorBoundaryFallback( ); const quickActions = ( -