diff --git a/client/src/App.tsx b/client/src/App.tsx index d43a626..67cfc92 100644 --- a/client/src/App.tsx +++ b/client/src/App.tsx @@ -1,8 +1,6 @@ import * as React from 'react'; import { useState, useEffect } from 'react'; import { MathJaxContext } from "better-react-mathjax"; -import * as rpc from 'vscode-ws-jsonrpc'; -import * as monaco from 'monaco-editor/esm/vs/editor/editor.api.js' import { Outlet } from "react-router-dom"; import '@fontsource/roboto/300.css'; @@ -12,9 +10,6 @@ import '@fontsource/roboto/700.css'; import { AppBar, CssBaseline, Toolbar, Typography } from '@mui/material'; -import Welcome from './components/Welcome'; -import Level from './components/Level'; -import GoodBye from './components/GoodBye'; import { useAppSelector } from './hooks'; function App() { diff --git a/client/src/ErrorPage.tsx b/client/src/ErrorPage.tsx new file mode 100644 index 0000000..3dbeb62 --- /dev/null +++ b/client/src/ErrorPage.tsx @@ -0,0 +1,17 @@ +import * as React from 'react' +import { useRouteError } from "react-router-dom"; + +export default function ErrorPage() { + const error: any = useRouteError(); + console.error(error); + + return ( +
Sorry, an unexpected error has occurred.
++ {error.statusText || error.message} +
+