added recover page on unexpected error

This commit is contained in:
thislight 2024-08-05 16:24:34 +08:00
parent abde6817f0
commit dbb14e3d74
4 changed files with 45 additions and 2 deletions

View file

@ -53,11 +53,13 @@ const App: Component = () => {
);
});
const UnexpectedError = lazy(() => import("./UnexpectedError.js"))
return (
<ErrorBoundary
fallback={(err, reset) => {
console.error(err);
return <></>;
return <UnexpectedError error={err} />;
}}
>
<ThemeProvider theme={theme()}>