diff --git a/react-project/src/App.jsx b/react-project/src/App.jsx
index 48f8a89..1a5e347 100644
--- a/react-project/src/App.jsx
+++ b/react-project/src/App.jsx
@@ -1,103 +1,63 @@
-import reactLogo from "./assets/react.svg";
-import viteLogo from "./assets/vite.svg";
import Header from "./components/Header";
import Footer from "./components/Footer";
import Carte from "./components/Carte";
-import Compteur from "./components/Compteur";
+import { useState } from "react";
import "./App.css";
+const jeux = [
+ {
+ id: 1,
+ titre: "Oracle of ages",
+ console: "Game Boy Color",
+ annee: 2001,
+ Type: "2d",
+ },
+ {
+ id: 2,
+ titre: "Breath of the Wild",
+ console: "Switch",
+ annee: 2017,
+ Type: "3d",
+ },
+ { id: 3, titre: "Majora's Mask", console: "N64", annee: 2000, Type: "3d" },
+ {
+ id: 4,
+ titre: "Tears of the kingdom",
+ console: "Switch",
+ annee: 2023,
+ Type: "3d",
+ },
+];
+
function App() {
+ const [recherche, setRecherche] = useState("");
+
+ const filtres = jeux.filter((j) =>
+ j.titre.toLowerCase().includes(recherche.toLowerCase()),
+ );
+
return (
<>
-
-
+ setRecherche(e.target.value)}
+ />
-
+ {filtres.length === 0 &&
Aucun jeu trouvé 😕
}
-
-
-
-
Documentation
-
Your questions, answered
-
-
-
-
-
Connect with us
-
Join the Vite community
-
-
-
+ {filtres.map((jeu) => (
+
+ ))}
-
>
diff --git a/react-project/src/components/Carte.jsx b/react-project/src/components/Carte.jsx
index ba3d5f9..5f377a6 100644
--- a/react-project/src/components/Carte.jsx
+++ b/react-project/src/components/Carte.jsx
@@ -1,8 +1,15 @@
+import Badge from "./Badge";
+import { useState } from "react";
+
function Carte(props) {
+ const [likes, setLikes] = useState(0);
return (
{props.titre}
-
{props.texte}
+
+ {props.console} - {props.annee} -
+
+
);
}
diff --git a/react-project/src/components/Docs.jsx b/react-project/src/components/Docs.jsx
deleted file mode 100644
index 3a80489..0000000
--- a/react-project/src/components/Docs.jsx
+++ /dev/null
@@ -1,27 +0,0 @@
-function Docs() {
- return (
-
-
-
Documentation
-
Your questions, answered
-
-
- );
-}
-
-export default Docs;
diff --git a/react-project/src/components/Footer.jsx b/react-project/src/components/Footer.jsx
index f86f20d..c401629 100644
--- a/react-project/src/components/Footer.jsx
+++ b/react-project/src/components/Footer.jsx
@@ -1,7 +1,7 @@
function Footer() {
return (
);
}
diff --git a/react-project/src/components/Header.jsx b/react-project/src/components/Header.jsx
index a198e37..fa4a8de 100644
--- a/react-project/src/components/Header.jsx
+++ b/react-project/src/components/Header.jsx
@@ -5,9 +5,9 @@ function Header() {
return (
-
The react project
+
The Zelda project
- Edit src/App.jsx and save to test HMR
+
Connect with us
-Join the Vite community
---
-
-
- GitHub
-
-
- -
-
-
- Discord
-
-
- -
-
-
- X.com
-
-
- -
-
-
- Bluesky
-
-
-
-