diff --git a/react-project/src/App.jsx b/react-project/src/App.jsx index 1a5e347..778b612 100644 --- a/react-project/src/App.jsx +++ b/react-project/src/App.jsx @@ -31,7 +31,8 @@ const jeux = [ function App() { const [recherche, setRecherche] = useState(""); - + const [total, setTotal] = useState(0); + const filtres = jeux.filter((j) => j.titre.toLowerCase().includes(recherche.toLowerCase()), ); @@ -55,9 +56,12 @@ function App() { titre={jeu.titre} console={jeu.console} annee={jeu.annee} + onLike={() => setTotal((t) => t + 1)} /> ))} +

Total de likes : {total}

+