aboutsummaryrefslogtreecommitdiffstats
path: root/apps/web/app/dashboard/lists
diff options
context:
space:
mode:
authorMohamedBassem <me@mbassem.com>2024-03-20 18:26:59 +0000
committerMohamedBassem <me@mbassem.com>2024-03-20 18:26:59 +0000
commit03faa429f9342b4b5aa15d870b4e86ee5bf41650 (patch)
treede5e49d664fa50adb8c8b625a93dddcef12d57a5 /apps/web/app/dashboard/lists
parent20d1a90e65d08c16f30d8d9adac005dda7f4dad1 (diff)
downloadkarakeep-03faa429f9342b4b5aa15d870b4e86ee5bf41650.tar.zst
fix(web): Greatly improve the search feeling by removing the flicker
Diffstat (limited to 'apps/web/app/dashboard/lists')
-rw-r--r--apps/web/app/dashboard/lists/[listId]/page.tsx32
1 files changed, 13 insertions, 19 deletions
diff --git a/apps/web/app/dashboard/lists/[listId]/page.tsx b/apps/web/app/dashboard/lists/[listId]/page.tsx
index a8ba4feb..f28d94b1 100644
--- a/apps/web/app/dashboard/lists/[listId]/page.tsx
+++ b/apps/web/app/dashboard/lists/[listId]/page.tsx
@@ -1,5 +1,5 @@
import { notFound, redirect } from "next/navigation";
-import BookmarksGrid from "@/components/dashboard/bookmarks/BookmarksGrid";
+import Bookmarks from "@/components/dashboard/bookmarks/Bookmarks";
import DeleteListButton from "@/components/dashboard/lists/DeleteListButton";
import { api } from "@/server/api/client";
import { getServerAuthSession } from "@/server/auth";
@@ -27,24 +27,18 @@ export default async function ListPage({
throw e;
}
- const bookmarks = await api.bookmarks.getBookmarks({
- listId: list.id,
- archived: false,
- });
-
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 />
- <BookmarksGrid
- query={{ listId: list.id, archived: false }}
- bookmarks={bookmarks}
- />
- </div>
+ <Bookmarks
+ query={{ listId: list.id, archived: false }}
+ showDivider={true}
+ header={
+ <div className="flex justify-between">
+ <span className="pt-4 text-2xl">
+ {list.icon} {list.name}
+ </span>
+ <DeleteListButton list={list} />
+ </div>
+ }
+ />
);
}