Added link to test url
This commit is contained in:
@@ -1,10 +1,9 @@
|
|||||||
import { auth } from "~/server/auth";
|
import { auth } from "~/server/auth";
|
||||||
import { UserNav } from "~/app/_components/macro/user-nav";
|
import { UserNav } from "~/app/_components/macro/user-nav";
|
||||||
import { api } from "~/trpc/server";
|
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 { 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({
|
export default async function List({
|
||||||
params,
|
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 h-full flex-1 flex-col space-y-8 p-8">
|
||||||
<div className="flex items-center justify-between space-y-2">
|
<div className="flex items-center justify-between space-y-2">
|
||||||
<div className="flex flex-row items-center gap-4">
|
<div className="flex flex-row items-center gap-4">
|
||||||
<Button size="icon" variant="ghost" className="rounded-full">
|
<Button
|
||||||
<ArrowLeft />
|
size="icon"
|
||||||
|
variant="ghost"
|
||||||
|
className="rounded-full"
|
||||||
|
asChild
|
||||||
|
>
|
||||||
|
<Link href="/">
|
||||||
|
<ArrowLeft />
|
||||||
|
</Link>
|
||||||
</Button>
|
</Button>
|
||||||
<div>
|
<div>
|
||||||
<h2 className="text-2xl font-bold tracking-tight">
|
<h2 className="text-2xl font-bold tracking-tight">
|
||||||
@@ -51,6 +57,16 @@ export default async function List({
|
|||||||
{list.variant}
|
{list.variant}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
<Button
|
||||||
|
size="icon"
|
||||||
|
variant="ghost"
|
||||||
|
className="rounded-full"
|
||||||
|
asChild
|
||||||
|
>
|
||||||
|
<Link href="/test/table">
|
||||||
|
<TestTube2 />
|
||||||
|
</Link>
|
||||||
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
<div className="flex items-center space-x-2">
|
<div className="flex items-center space-x-2">
|
||||||
<UserNav />
|
<UserNav />
|
||||||
|
|||||||
@@ -1,5 +1,13 @@
|
|||||||
import { z } from "zod";
|
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>;
|
export type TaskCreationSchema = z.infer<typeof taskCreationFormSchema>;
|
||||||
|
|||||||
Reference in New Issue
Block a user