import { TaskCard } from './TaskCard' import { useQuery } from '@tanstack/react-query' const columns = ['todo', 'in_progress', 'review', 'done'] export function Kanban() { const { data: tasks = [] } = useQuery({ queryKey: ['tasks'], queryFn: async () => { const res = await fetch('/api/v1/tasks') return res.json() }, }) return (

Project Kanban

{columns.map((status) => (

{status.replace('_', ' ')} {tasks.filter((t: any) => t.status === status).length}

{tasks .filter((t: any) => t.status === status) .map((task: any) => ( ))}
))}
) }