stuve-it-frontend/src/Router.tsx

32 lines
618 B
TypeScript
Raw Normal View History

2024-03-26 16:07:08 +00:00
import {createBrowserRouter, RouterProvider} from "react-router-dom";
import HomePage from "./pages/home";
import NotFound from "./pages/not-found";
import Layout from "./components/layout";
const router = createBrowserRouter([
{
path: "/",
element: <Layout/>,
children: [
{
index: true,
element: <HomePage/>
},
{
path: "*",
element: <NotFound/>
}
]
},
])
function Router() {
return (
<RouterProvider router={router}/>
)
}
export default Router