From e38b05b5a568a254deb4433294794ed188c542b0 Mon Sep 17 00:00:00 2001 From: Melissa Date: Thu, 25 Jun 2026 14:46:54 +0200 Subject: [PATCH] tried t use react router but page and accueuil aren't defined --- react-project/src/App.jsx | 12 ++++++++++++ react-project/src/components/Carte.jsx | 2 ++ react-project/src/main.jsx | 18 ++++++++++++------ 3 files changed, 26 insertions(+), 6 deletions(-) diff --git a/react-project/src/App.jsx b/react-project/src/App.jsx index d12efe4..fbc9043 100644 --- a/react-project/src/App.jsx +++ b/react-project/src/App.jsx @@ -3,6 +3,8 @@ import Footer from "./components/Footer"; import Carte from "./components/Carte"; import BarreRecherche from "./components/BarreRecherche"; import { useState, useEffect } from "react"; +import { Routes, Route } from "react-router-dom"; +import { useParams } from "react-router-dom"; import "./App.css"; function App() { @@ -51,8 +53,18 @@ function App() { if (chargement) return

Chargement…

; + function Detail() { + const { id } = useParams(); + return

Détails du jeu {id}

; + } + return ( <> + + } /> + } /> + +
{props.console} - {props.annee} -

+ Voir les détails