This repository has been archived on 2024-10-09. You can view files and clone it, but cannot push or open issues or pull requests.
ui/src/blocks/tasks/TasksBlocks.tsx
2024-04-04 23:11:29 +02:00

36 lines
1016 B
TypeScript

import { z } from "zod"
import { columns } from "./components/columns.tsx"
import { DataTable } from "./components/data-table.tsx"
import { UserNav } from "./components/user-nav.tsx"
import { taskSchema } from "./data/schema"
import tasks from "./data/tasks.json"
// Simulate a database read for tasks.
function getTasks() {
return z.array(taskSchema).parse(tasks)
}
export default function TaskPage() {
return (
<>
<div className="hidden h-full flex-1 flex-col space-y-8 p-8 md:flex">
<div className="flex items-center justify-between space-y-2">
<div>
<h2 className="text-2xl font-bold tracking-tight">Welcome back!</h2>
<p className="text-muted-foreground">
Here&apos;s a list of your tasks for this month!
</p>
</div>
<div className="flex items-center space-x-2">
<UserNav />
</div>
</div>
<DataTable data={getTasks()} columns={columns} />
</div>
</>
)
}