From 00adf842a374fe8a6a338d6d139d51a61ff3de1b Mon Sep 17 00:00:00 2001 From: Antoine M Date: Tue, 30 Jan 2024 17:13:46 +0100 Subject: [PATCH] introducing react router --- src/App.js | 38 +++++++++++++++++++++++++++++++------- 1 file changed, 31 insertions(+), 7 deletions(-) diff --git a/src/App.js b/src/App.js index ffc3162..3478f9f 100644 --- a/src/App.js +++ b/src/App.js @@ -1,12 +1,36 @@ -import "./App.css"; -// import Home from "./pages/Home.jsx"; -import Routes from "./routes.js"; +import "./assets/css/App.scss"; +import Home from "./pages/Home.jsx"; +import Test from "./pages/Test.jsx"; +import Single from "./pages/Single.jsx"; +import SearchAndFind from "./screens/SearchAndFind.jsx"; + +import { createBrowserRouter, RouterProvider } from "react-router-dom"; + +const router = createBrowserRouter([ + { + path: "/", + element: , + }, + { + path: "/test", + element: , + }, + { + path: "/play", + element: , + }, + { + path: "/article/:id", + element: , + }, +]); + function App() { return ( -
-

salut

- {/* */} -
+ <> + {/* */} + ; + ); }