jsp...
This commit is contained in:
@@ -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>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user