import React, { useState, useEffect } from 'react'; interface Task { id: string; name: string; status: string; priority: string; assignee: string; due_date: string; } interface Column { id: string; title: string; tasks: Task[]; } export default function App() { const [columns, setColumns] = useState([]); const [loading, setLoading] = useState(true); useEffect(() => { // Mock data setTimeout(() => { const mockTasks: Task[] = [ { id: '1', name: 'Complete project proposal', status: 'To Do', priority: 'high', assignee: 'John Doe', due_date: '2024-02-15' }, { id: '2', name: 'Review design mockups', status: 'To Do', priority: 'medium', assignee: 'Jane Smith', due_date: '2024-02-14' }, { id: '3', name: 'Fix critical bug', status: 'In Progress', priority: 'urgent', assignee: 'Alice Williams', due_date: '2024-02-12' }, { id: '4', name: 'Refactor API endpoints', status: 'In Progress', priority: 'high', assignee: 'Jane Smith', due_date: '2024-02-18' }, { id: '5', name: 'Update documentation', status: 'In Review', priority: 'low', assignee: 'Bob Johnson', due_date: '2024-02-10' }, { id: '6', name: 'Deploy to staging', status: 'Done', priority: 'medium', assignee: 'John Doe', due_date: '2024-02-08' }, { id: '7', name: 'Write unit tests', status: 'To Do', priority: 'medium', assignee: 'Bob Johnson', due_date: '2024-02-20' }, ]; const statuses = ['To Do', 'In Progress', 'In Review', 'Done']; const cols = statuses.map(status => ({ id: status, title: status, tasks: mockTasks.filter(task => task.status === status) })); setColumns(cols); setLoading(false); }, 500); }, []); if (loading) { return
Loading board...
; } return (

📊 Task Board

Kanban board view organized by status

{columns.map(column => (

{column.title}

{column.tasks.length}
{column.tasks.map(task => (
{task.name}
{task.priority} 👤 {task.assignee}
📅 {task.due_date}
))} {column.tasks.length === 0 && (
No tasks
)}
))}
); }