diff --git a/packages/web_ui/src/components/App.jsx b/packages/web_ui/src/components/App.jsx index 2c90130d..255f1aa1 100644 --- a/packages/web_ui/src/components/App.jsx +++ b/packages/web_ui/src/components/App.jsx @@ -5,13 +5,25 @@ import { BrowserRouter } from "react-router-dom"; import { logger } from "@clusterio/lib/logging"; import basename from "../basename"; +import ErrorBoundary from "./ErrorBoundary"; import SiteLayout from "./SiteLayout"; import ControlContext from "./ControlContext"; import PluginsContext from "./PluginsContext"; import LoginForm from "./LoginForm"; -import { Card, Spin } from "antd"; +import { Card, Spin, Typography } from "antd"; +const { Paragraph } = Typography; + + +function ErrorCard(props) { + return
+ +

An unexpected error occured

+ {props.error.stack} +
+
; +} export default function App(props) { let [connected, setConnected] = useState(false); @@ -77,12 +89,14 @@ export default function App(props) { } return ( - - - - {page} - - - + + + + + {page} + + + + ); }