Added link to test url

This commit is contained in:
2024-11-23 12:08:30 -06:00
parent 983cc1f2b7
commit d9f4a56dd3
2 changed files with 30 additions and 6 deletions

View File

@@ -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({
<div className="flex h-full flex-1 flex-col space-y-8 p-8">
<div className="flex items-center justify-between space-y-2">
<div className="flex flex-row items-center gap-4">
<Button size="icon" variant="ghost" className="rounded-full">
<ArrowLeft />
<Button
size="icon"
variant="ghost"
className="rounded-full"
asChild
>
<Link href="/">
<ArrowLeft />
</Link>
</Button>
<div>
<h2 className="text-2xl font-bold tracking-tight">
@@ -51,6 +57,16 @@ export default async function List({
{list.variant}
</p>
</div>
<Button
size="icon"
variant="ghost"
className="rounded-full"
asChild
>
<Link href="/test/table">
<TestTube2 />
</Link>
</Button>
</div>
<div className="flex items-center space-x-2">
<UserNav />

View File

@@ -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<typeof taskCreationFormSchema>;