From dab2650776be39a291d6b25a25c94e673e70949d Mon Sep 17 00:00:00 2001 From: Melissa Date: Wed, 24 Jun 2026 11:58:38 +0200 Subject: [PATCH] details on like total (still doesn't work) --- react-project/src/App.jsx | 2 +- react-project/src/components/Carte.jsx | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/react-project/src/App.jsx b/react-project/src/App.jsx index 778b612..3ea985a 100644 --- a/react-project/src/App.jsx +++ b/react-project/src/App.jsx @@ -32,7 +32,7 @@ const jeux = [ function App() { const [recherche, setRecherche] = useState(""); const [total, setTotal] = useState(0); - + const filtres = jeux.filter((j) => j.titre.toLowerCase().includes(recherche.toLowerCase()), ); diff --git a/react-project/src/components/Carte.jsx b/react-project/src/components/Carte.jsx index 5f377a6..5d29a82 100644 --- a/react-project/src/components/Carte.jsx +++ b/react-project/src/components/Carte.jsx @@ -1,15 +1,18 @@ +import { useEffect } from "react"; import Badge from "./Badge"; import { useState } from "react"; function Carte(props) { const [likes, setLikes] = useState(0); + useEffect(() => {}, [likes]); + return (

{props.titre}

{props.console} - {props.annee} -

- +
); }