diff --git a/src/app/list/[id]/page.tsx b/src/app/list/[id]/page.tsx index 678430d..50b2c31 100644 --- a/src/app/list/[id]/page.tsx +++ b/src/app/list/[id]/page.tsx @@ -1,10 +1,9 @@ import { auth } from "~/server/auth"; import { UserNav } from "~/app/_components/macro/user-nav"; import { api } from "~/trpc/server"; -import { DataTable } from "~/app/_components/example/data-table"; -import { columns } from "~/app/_components/example/columns"; import { Button } from "~/app/_components/ui/button"; -import { ArrowLeft } from "lucide-react"; +import { ArrowLeft, TestTube2 } from "lucide-react"; +import Link from "next/link"; export default async function List({ params, @@ -40,8 +39,15 @@ export default async function List({
-

@@ -51,6 +57,16 @@ export default async function List({ {list.variant}

+
diff --git a/src/lib/schemas/task-creation-form.ts b/src/lib/schemas/task-creation-form.ts index 2b57528..227a42a 100644 --- a/src/lib/schemas/task-creation-form.ts +++ b/src/lib/schemas/task-creation-form.ts @@ -1,5 +1,13 @@ import { z } from "zod"; -export const taskCreationFormSchema = z.object({}); +export const taskTitleSchema = z + .string() + .min(1, "title cannot be empty") + .max(128, "title cannot be more than 128 characters"); + +export const taskCreationFormSchema = z.object({ + listId: z.number(), + title: taskTitleSchema, // Text +}); export type TaskCreationSchema = z.infer;