mirror of
https://gitlab.com/MrFry/qmining-page
synced 2025-04-01 20:23:44 +02:00
Added groups
This commit is contained in:
@@ -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>
|
||||
|
Reference in New Issue
Block a user