diff --git a/src/app/list/[id]/page.tsx b/src/app/list/[id]/page.tsx new file mode 100644 index 0000000..f50740d --- /dev/null +++ b/src/app/list/[id]/page.tsx @@ -0,0 +1,65 @@ +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"; + +export default async function List({ + params, +}: { + params: Promise<{ id: number }>; +}) { + const session = await auth(); + if (!session) { + return ( +
+

Not signed in

+
+ ); + } + + const listId = (await params).id; + const list = await api.list.get({ listId }); + if (!list) { + return ( +
+

No list found with id {listId}

+
+ ); + } + + return ( +
+

+ {session?.user.name ? `${session.user.name}'s notes` : "notes"} +

+ +
+
+
+
+ +
+

+ {list.title} +

+

+ {list.variant} +

+
+
+
+ +
+
+ + {/* */} +
+
+
+ ); +}