Created
January 25, 2021 06:25
-
-
Save syamjayaraj/6470a73c473b1dfbf9b0363e6ecb6c0b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from "react"; | |
import { Card, Button } from "react-bootstrap"; | |
function VotingCard(props) { | |
let { team, incrementVoteCount } = props; | |
return ( | |
<Card style={{ width: "18rem" }}> | |
<Card.Img variant="top" src={`/assets/images/${team.logo}`} /> | |
<Card.Body> | |
<Card.Title>{team.name}</Card.Title> | |
<Button variant="success" onClick={() => incrementVoteCount(team._id)}> | |
Vote | |
</Button> | |
</Card.Body> | |
<Card.Footer>Vote count: {team.votes}</Card.Footer> | |
</Card> | |
); | |
} | |
export default VotingCard; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment