aboutsummaryrefslogtreecommitdiffstats
path: root/packages/web/app/dashboard/lists
diff options
context:
space:
mode:
authorMohamedBassem <me@mbassem.com>2024-03-13 21:43:44 +0000
committerMohamed Bassem <me@mbassem.com>2024-03-14 16:40:45 +0000
commit04572a8e5081b1e4871e273cde9dbaaa44c52fe0 (patch)
tree8e993acb732a50d1306d4d6953df96c165c57f57 /packages/web/app/dashboard/lists
parent2df08ed08c065e8b91bc8df0266bd4bcbb062be4 (diff)
downloadkarakeep-04572a8e5081b1e4871e273cde9dbaaa44c52fe0.tar.zst
structure: Create apps dir and copy tooling dir from t3-turbo repo
Diffstat (limited to 'packages/web/app/dashboard/lists')
-rw-r--r--packages/web/app/dashboard/lists/[listId]/page.tsx44
-rw-r--r--packages/web/app/dashboard/lists/page.tsx14
2 files changed, 0 insertions, 58 deletions
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 (
- <div className="container flex flex-col gap-3">
- <div className="flex justify-between">
- <span className="pt-4 text-2xl">
- {list.icon} {list.name}
- </span>
- <DeleteListButton list={list} />
- </div>
- <hr />
- <ListView list={list} bookmarks={bookmarks.bookmarks} />
- </div>
- );
-}
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 (
- <div className="container mt-4 flex flex-col gap-3">
- <p className="text-2xl">📋 All Lists</p>
- <hr />
- <AllListsView initialData={lists.lists} />
- </div>
- );
-}