mirror of
https://github.com/arcan1s/ahriman.git
synced 2026-03-24 02:13:38 +00:00
feat: add error boundary
This commit is contained in:
@@ -21,11 +21,18 @@ import "chartSetup";
|
||||
import "utils";
|
||||
|
||||
import App from "App";
|
||||
import ErrorFallback from "components/common/ErrorBoundary";
|
||||
import { StrictMode } from "react";
|
||||
import { createRoot } from "react-dom/client";
|
||||
import { ErrorBoundary } from "react-error-boundary";
|
||||
|
||||
createRoot(document.getElementById("root")!).render(
|
||||
<StrictMode>
|
||||
<App />
|
||||
<ErrorBoundary
|
||||
FallbackComponent={ErrorFallback}
|
||||
onError={(error, info) => console.error("Uncaught error:", error, info.componentStack)}
|
||||
>
|
||||
<App />
|
||||
</ErrorBoundary>
|
||||
</StrictMode>,
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user