From d66b618f22f51872e55daef86d2853e9455d0fd7 Mon Sep 17 00:00:00 2001 From: Antoine M Date: Wed, 15 May 2024 10:13:53 +0200 Subject: [PATCH] testing error page --- src/index.js | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/index.js b/src/index.js index 1b3f007..2d9c670 100644 --- a/src/index.js +++ b/src/index.js @@ -7,15 +7,25 @@ import { BrowserRouter, Route, Routes, useLocation } from "react-router-dom"; import { AnimatePresence } from "framer-motion"; import Home from "./pages/Home.jsx"; import Profile from "./pages/Profile.jsx"; -import {ErrorBoundary} from "./components/ErrorBoundary.jsx"; +import { ErrorBoundary } from "react-error-boundary"; +// import { ErrorBoundary } from "./components/ErrorBoundary.jsx"; const root = ReactDOM.createRoot(document.getElementById("root")); +function fallbackRender({ error, resetErrorBoundary }) { + return ( +
+

Something went wrong:

+
{error.message}
+
+ ); +} + root.render( - Something went wrong

}> +