initial app

This commit is contained in:
Arnie
2023-06-01 20:24:59 +02:00
parent bb19e15a40
commit 34993f7f61
64 changed files with 10002 additions and 0 deletions
+39
View File
@@ -0,0 +1,39 @@
import React from "react";
import { Outlet, RouterProvider } from "react-router-dom";
import { createBrowserRouter } from "react-router-dom";
import { ErrorBoundary } from "../components/ErrorBoundary";
import Dashboard from "./Dashboard";
const Layout: React.FC = () => {
return (
<ErrorBoundary>
<Outlet />
</ErrorBoundary>
);
};
const NotFound = React.lazy(() => import("./NotFound"));
const router = createBrowserRouter([
{
path: "/",
element: <Layout />,
children: [
{
index: true,
element: <Dashboard />,
},
{
path: "*",
element: <NotFound />,
},
],
},
]);
const Router = (): JSX.Element => {
return <RouterProvider router={router} />;
};
export default Router;