added likes and search bar but badges don't work
This commit is contained in:
1 parent
bdd8316838
commit
9bb89e8280
5 files changed
+58
-118
No files matched your search
@@ -1,8 +1,15 @@
|
||||
import Badge from "./Badge";
|
||||
import { useState } from "react";
|
||||
|
||||
function Carte(props) {
|
||||
const [likes, setLikes] = useState(0);
|
||||
return (
|
||||
<div className="carte">
|
||||
<h2>{props.titre}</h2>
|
||||
<p>{props.texte}</p>
|
||||
<p>
|
||||
{props.console} - {props.annee} - <Badge />
|
||||
</p>
|
||||
<button onClick={() => setLikes(likes + 1)}>❤️ {likes}</button>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
function Docs() {
|
||||
return (
|
||||
<div id="docs">
|
||||
<svg className="icon" role="presentation" aria-hidden="true">
|
||||
<use href="/icons.svg#documentation-icon"></use>
|
||||
</svg>
|
||||
<h2>Documentation</h2>
|
||||
<p>Your questions, answered</p>
|
||||
<ul>
|
||||
<li>
|
||||
<a href="https://vite.dev/" target="_blank">
|
||||
<img className="logo" src={viteLogo} alt="" />
|
||||
Explore Vite
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="https://react.dev/" target="_blank">
|
||||
<img className="button-icon" src={reactLogo} alt="" />
|
||||
Learn more
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default Docs;
|
||||
@@ -1,7 +1,7 @@
|
||||
function Footer() {
|
||||
return (
|
||||
<div id="foot">
|
||||
<h3>The react project</h3>
|
||||
<h3>The Zelda project</h3>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -5,9 +5,9 @@ function Header() {
|
||||
return (
|
||||
<section id="center">
|
||||
<div>
|
||||
<h1>The react project</h1>
|
||||
<h1>The Zelda project</h1>
|
||||
<p>
|
||||
Edit <code>src/App.jsx</code> and save to test <code>HMR</code>
|
||||
<img src="https://www.greenmangaming.com/blog/wp-content/uploads/2021/06/zelda-timeline.jpg"></img>
|
||||
</p>
|
||||
</div>
|
||||
<button
|
||||
|
||||
Reference in new issue
Block a user