import { Task } from "@/state/api"; import { format } from "date-fns"; import Image from "next/image"; import React from "react"; type Props = { task: Task; }; const TaskCard = ({ task }: Props) => { return (
ID: {task.id}
Title: {task.title}
Description:{" "} {task.description || "No description provided"}
Status: {task.status}
Priority: {task.priority}
Tags: {task.tags || "No tags"}
Start Date:{" "} {task.startDate ? format(new Date(task.startDate), "P") : "Not set"}
Due Date:{" "} {task.dueDate ? format(new Date(task.dueDate), "P") : "Not set"}
Author:{" "} {task.author ? task.author.username : "Unknown"}
Assignee:{" "} {task.assignee ? task.assignee.username : "Unassigned"}