This commit is contained in:
Stage1 committed 2026-06-24 14:36:43 +02:00
1 parent 6621ced8c5
commit bd1e9adf13
1 file changed
+1 -3
+1 -3
View File
@@ -1,13 +1,11 @@
import { useState } from "react";
function Carte(props) {
const [likes, setLikes] = useState(0);
return (
<div className="carte">
<h2>{props.titre}</h2>
<p>{props.niveaux}</p>
<p>{props.createur}</p>
<h2>{props.nom}</h2>
<button onClick={() => setLikes(likes + 1)}>❤️ {likes}</button>
<button onClick={props.onLike}>❤️ J'aime</button>
</div>
);
}