From 74006ce8a88bf8c0b42676bbb438725d1ef72aef Mon Sep 17 00:00:00 2001 From: Jalil Arfaoui Date: Mon, 30 Jan 2023 02:01:57 +0100 Subject: [PATCH] =?UTF-8?q?feat:=20ajoute=20un=20bouton=20de=20retour=20?= =?UTF-8?q?=C3=A0=20la=20liste=20des=20r=C3=A9sistants?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/routes/PageResistant.tsx | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/routes/PageResistant.tsx b/src/routes/PageResistant.tsx index 503f020..5ae1fc4 100644 --- a/src/routes/PageResistant.tsx +++ b/src/routes/PageResistant.tsx @@ -1,15 +1,18 @@ import {useLoaderData, useParams} from "react-router"; +import {Link} from "react-router-dom"; import {Resistant} from "../Resistant"; export const PageResistant = () => { - const { nomResistant } = useParams() - const { resistants } = useLoaderData() as { resistants: Resistant[] } + const {nomResistant} = useParams() + const {resistants} = useLoaderData() as { resistants: Resistant[] } const resistant = resistants.find(r => r.noms === nomResistant) if (!resistant) return <>Résistant introuvable - return
+ return <> + Retour à la liste des résistants +
@@ -90,4 +93,5 @@ export const PageResistant = () => {
+ }