fix: broken resistant page

proto-module-actu-react
Jalil Arfaoui 2023-02-24 00:31:39 +01:00
parent a2eb85880c
commit fcf2977eb9
1 changed files with 2 additions and 3 deletions

View File

@ -1,10 +1,9 @@
import { useLoaderData, useNavigate, useParams } from "react-router";
import { Resistant } from "../Resistant";
import { useNavigate, useParams } from "react-router";
import { getResistantPhotoUrl } from "../getResistantPhotoUrl";
import { resistants } from "../resistants";
export const PageResistant = () => {
const { nomResistant } = useParams();
const { resistants } = useLoaderData() as { resistants: Resistant[] };
const navigate = useNavigate();
const resistant = resistants.find((r) => r.noms === nomResistant);