mirror of
https://gitlab.com/MrFry/qmining-page
synced 2025-04-01 20:23:44 +02:00
Added groups
This commit is contained in:
parent
c09bb64b2a
commit
bc776b3307
8 changed files with 94 additions and 14 deletions
|
@ -4,12 +4,15 @@ import styles from './todoCard.module.css'
|
|||
|
||||
export default function TodoCard(props) {
|
||||
const { categories, onClick, userId } = props
|
||||
const { name, category, points, votes, id } = props.cardData
|
||||
const { name, category, points, votes, id, group } = props.cardData
|
||||
const voted = votes.includes(userId)
|
||||
|
||||
return (
|
||||
<div
|
||||
className={`${styles.card} ${voted && styles.voted}`}
|
||||
className={styles.card}
|
||||
style={{
|
||||
border: `2px solid ${group || '#99f'}`,
|
||||
}}
|
||||
onClick={() => {
|
||||
onClick(props.cardData)
|
||||
}}
|
||||
|
@ -31,7 +34,7 @@ export default function TodoCard(props) {
|
|||
</span>
|
||||
</div>
|
||||
<div className={styles.numbers}>
|
||||
<div>
|
||||
<div className={`${voted && styles.voted}`}>
|
||||
<div>{`Votes: ${votes.length}`}</div>
|
||||
</div>
|
||||
<div>{points}</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue