diff options
| author | MohamedBassem <me@mbassem.com> | 2024-03-20 18:26:59 +0000 |
|---|---|---|
| committer | MohamedBassem <me@mbassem.com> | 2024-03-20 18:26:59 +0000 |
| commit | 03faa429f9342b4b5aa15d870b4e86ee5bf41650 (patch) | |
| tree | de5e49d664fa50adb8c8b625a93dddcef12d57a5 /apps/web/app/dashboard/lists | |
| parent | 20d1a90e65d08c16f30d8d9adac005dda7f4dad1 (diff) | |
| download | karakeep-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.tsx | 32 |
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> + } + /> ); } |
