diff --git a/src/components/base/base-error-boundary.tsx b/src/components/base/base-error-boundary.tsx index 3c04508..2475a2f 100644 --- a/src/components/base/base-error-boundary.tsx +++ b/src/components/base/base-error-boundary.tsx @@ -3,18 +3,24 @@ import { ErrorBoundary, FallbackProps } from "react-error-boundary"; function ErrorFallback({ error }: FallbackProps) { return ( -
-

Something went wrong:(

+
+

Something went wrong:(

+
{error.message}
+ +
+ Error Stack +
{error.stack}
+
); } -interface BaseErrorBoundaryProps { +interface Props { children?: ReactNode; } -export const BaseErrorBoundary: React.FC = (props) => { +export const BaseErrorBoundary = (props: Props) => { return ( {props.children} diff --git a/src/main.tsx b/src/main.tsx index 0b0cf98..8588844 100644 --- a/src/main.tsx +++ b/src/main.tsx @@ -11,6 +11,7 @@ import React from "react"; import { createRoot } from "react-dom/client"; import { RecoilRoot } from "recoil"; import { BrowserRouter } from "react-router-dom"; +import { BaseErrorBoundary } from "./components/base"; import Layout from "./pages/_layout"; import "./services/i18n"; @@ -26,9 +27,11 @@ if (!container) { createRoot(container).render( - - - + + + + + );