From ef227551c7b6925905907a923d45414f3c7269d8 Mon Sep 17 00:00:00 2001 From: dorian melenotte Date: Wed, 7 Aug 2024 14:51:03 +0200 Subject: [PATCH] ADD: initialisation of all the routes for the button --- src/files/About.jsx | 3 +++ src/files/Blog.jsx | 3 +++ src/files/Downloads.jsx | 3 +++ src/files/Help.jsx | 3 +++ src/files/Product.jsx | 3 +++ src/files/Serveurs.jsx | 3 +++ src/main.jsx | 5 +++-- src/services/Router.jsx | 25 +++++++++++++++++++++++++ 8 files changed, 46 insertions(+), 2 deletions(-) diff --git a/src/files/About.jsx b/src/files/About.jsx index e69de29..0ce85bd 100644 --- a/src/files/About.jsx +++ b/src/files/About.jsx @@ -0,0 +1,3 @@ +export function About() { + return

Ici vous pouvez lire en quoi est constitué le projet

; +} diff --git a/src/files/Blog.jsx b/src/files/Blog.jsx index e69de29..54a53f7 100644 --- a/src/files/Blog.jsx +++ b/src/files/Blog.jsx @@ -0,0 +1,3 @@ +export function Blog() { + return

Ici vous pouvez lire le blog des dernieres maj

; +} diff --git a/src/files/Downloads.jsx b/src/files/Downloads.jsx index e69de29..757fddf 100644 --- a/src/files/Downloads.jsx +++ b/src/files/Downloads.jsx @@ -0,0 +1,3 @@ +export function Downloads() { + return

Voici la page des downloads

; +} diff --git a/src/files/Help.jsx b/src/files/Help.jsx index e69de29..8649195 100644 --- a/src/files/Help.jsx +++ b/src/files/Help.jsx @@ -0,0 +1,3 @@ +export function Help() { + return

Ici vous pouvez demander de l'aide

; +} diff --git a/src/files/Product.jsx b/src/files/Product.jsx index e69de29..cfa79cf 100644 --- a/src/files/Product.jsx +++ b/src/files/Product.jsx @@ -0,0 +1,3 @@ +export function Product() { + return

Voici les produits

; +} diff --git a/src/files/Serveurs.jsx b/src/files/Serveurs.jsx index e69de29..df84ebd 100644 --- a/src/files/Serveurs.jsx +++ b/src/files/Serveurs.jsx @@ -0,0 +1,3 @@ +export function Serveurs() { + return

Voici les serveurs

; +} diff --git a/src/main.jsx b/src/main.jsx index 4de39e2..2a3c787 100644 --- a/src/main.jsx +++ b/src/main.jsx @@ -4,10 +4,11 @@ import ReactDOM from "react-dom/client"; import { RouterProvider } from "react-router-dom"; import back_img from "./assets/img_site.jpg"; import { router } from "./services/Router.jsx"; -function buttoncaller(argv) { + +/* function button_caller(argv) { console.log(argv); alert(argv); -} +} */ ReactDOM.createRoot(document.getElementById("root")).render( <> diff --git a/src/services/Router.jsx b/src/services/Router.jsx index 63e3527..8b89bd5 100644 --- a/src/services/Router.jsx +++ b/src/services/Router.jsx @@ -1,6 +1,11 @@ import { createBrowserRouter } from "react-router-dom"; +import { About } from "../files/About"; import { Accueil } from "../files/Accueil"; +import { Blog } from "../files/Blog"; +import { Help } from "../files/Help"; +import { Product } from "../files/Product"; import { Register } from "../files/Register"; +import { Serveurs } from "../files/Serveurs"; import { SignIn } from "../files/Sign_in"; export const router = createBrowserRouter([ @@ -16,4 +21,24 @@ export const router = createBrowserRouter([ path: "/register", element: , }, + { + path: "/about", + element: , + }, + { + path: "/blog", + element: , + }, + { + path: "/help", + element: , + }, + { + path: "/product", + element: , + }, + { + path: "/serveurs", + element: , + }, ]);