File: client/src/components/Board/TaskCard.jsx
createdAt exists in MongoDB but never shown on card.
Show "2 hours ago" or "3 days ago" at the bottom.
Fix: Write a simple timeAgo function:
const timeAgo = (date) => {
const diff = Date.now() - new Date(date)
const days = Math.floor(diff / 86400000)
return days === 0 ? "today" : ${days}d ago
}
~8 lines, no package needed!
File: client/src/components/Board/TaskCard.jsx
createdAt exists in MongoDB but never shown on card.
Show "2 hours ago" or "3 days ago" at the bottom.
Fix: Write a simple timeAgo function:
const timeAgo = (date) => {
const diff = Date.now() - new Date(date)
const days = Math.floor(diff / 86400000)
return days === 0 ? "today" :
${days}d ago}
~8 lines, no package needed!