mirror of
https://gitlab.com/MrFry/qmining-page
synced 2025-04-01 20:23:44 +02:00
Contribute page imporvements, sidebar for cards
This commit is contained in:
parent
db5aad0f8c
commit
1a02ae2e98
13 changed files with 274 additions and 79 deletions
|
@ -3,19 +3,15 @@ import React from 'react'
|
|||
import styles from './todoCard.module.css'
|
||||
|
||||
export default function TodoCard(props) {
|
||||
const { categories, onClick, userId, clickable } = props
|
||||
const { name, description, category, points, votes, id } = props.cardData
|
||||
const { categories, onClick, userId } = props
|
||||
const { name, category, points, votes, id } = props.cardData
|
||||
const voted = votes.includes(userId)
|
||||
|
||||
return (
|
||||
<div
|
||||
className={`${styles.card} ${clickable && styles.clickable} ${voted &&
|
||||
styles.voted}`}
|
||||
title={description}
|
||||
className={`${styles.card} ${voted && styles.voted}`}
|
||||
onClick={() => {
|
||||
if (clickable) {
|
||||
onClick(id)
|
||||
}
|
||||
onClick(props.cardData)
|
||||
}}
|
||||
>
|
||||
<div className={styles.description}>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue