From 04572a8e5081b1e4871e273cde9dbaaa44c52fe0 Mon Sep 17 00:00:00 2001 From: MohamedBassem Date: Wed, 13 Mar 2024 21:43:44 +0000 Subject: structure: Create apps dir and copy tooling dir from t3-turbo repo --- packages/web/app/dashboard/lists/[listId]/page.tsx | 44 ---------------------- packages/web/app/dashboard/lists/page.tsx | 14 ------- 2 files changed, 58 deletions(-) delete mode 100644 packages/web/app/dashboard/lists/[listId]/page.tsx delete mode 100644 packages/web/app/dashboard/lists/page.tsx (limited to 'packages/web/app/dashboard/lists') diff --git a/packages/web/app/dashboard/lists/[listId]/page.tsx b/packages/web/app/dashboard/lists/[listId]/page.tsx deleted file mode 100644 index 006fd3ad..00000000 --- a/packages/web/app/dashboard/lists/[listId]/page.tsx +++ /dev/null @@ -1,44 +0,0 @@ -import { api } from "@/server/api/client"; -import { getServerAuthSession } from "@/server/auth"; -import { TRPCError } from "@trpc/server"; -import { notFound, redirect } from "next/navigation"; -import ListView from "@/components/dashboard/lists/ListView"; -import DeleteListButton from "@/components/dashboard/lists/DeleteListButton"; - -export default async function ListPage({ - params, -}: { - params: { listId: string }; -}) { - const session = await getServerAuthSession(); - if (!session) { - redirect("/"); - } - - let list; - try { - list = await api.lists.get({ listId: params.listId }); - } catch (e) { - if (e instanceof TRPCError) { - if (e.code == "NOT_FOUND") { - notFound(); - } - } - throw e; - } - - const bookmarks = await api.bookmarks.getBookmarks({ ids: list.bookmarks }); - - return ( -
-
- - {list.icon} {list.name} - - -
-
- -
- ); -} diff --git a/packages/web/app/dashboard/lists/page.tsx b/packages/web/app/dashboard/lists/page.tsx deleted file mode 100644 index 88eeda47..00000000 --- a/packages/web/app/dashboard/lists/page.tsx +++ /dev/null @@ -1,14 +0,0 @@ -import { api } from "@/server/api/client"; -import AllListsView from "@/components/dashboard/lists/AllListsView"; - -export default async function ListsPage() { - const lists = await api.lists.list(); - - return ( -
-

📋 All Lists

-
- -
- ); -} -- cgit v1.2.3-70-g09d2