import React from 'react' import styles from './todoCard.module.css' const clickableTypes = ['todo', 'blocked', 'inprogress', 'testing'] export default function TodoCard(props) { const { categories, type, onClick, userId } = props const { name, description, category, points, votes, id } = props.cardData const clickable = clickableTypes.includes(type) const voted = votes.includes(userId) return (
{ if (clickable) { onClick(id) } }} >
{`#${id}`} {name}
{category}
{`Votes: ${votes.length}`}
{points}
) }