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/components/dashboard/bookmarks/Bookmarks.tsx | |
| parent | 20d1a90e65d08c16f30d8d9adac005dda7f4dad1 (diff) | |
| download | karakeep-03faa429f9342b4b5aa15d870b4e86ee5bf41650.tar.zst | |
fix(web): Greatly improve the search feeling by removing the flicker
Diffstat (limited to 'apps/web/components/dashboard/bookmarks/Bookmarks.tsx')
| -rw-r--r-- | apps/web/components/dashboard/bookmarks/Bookmarks.tsx | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/apps/web/components/dashboard/bookmarks/Bookmarks.tsx b/apps/web/components/dashboard/bookmarks/Bookmarks.tsx index 96e5c067..cee620c9 100644 --- a/apps/web/components/dashboard/bookmarks/Bookmarks.tsx +++ b/apps/web/components/dashboard/bookmarks/Bookmarks.tsx @@ -4,16 +4,16 @@ import { getServerAuthSession } from "@/server/auth"; import type { ZGetBookmarksRequest } from "@hoarder/trpc/types/bookmarks"; -import BookmarksGrid from "./BookmarksGrid"; +import UpdatableBookmarksGrid from "./UpdatableBookmarksGrid"; export default async function Bookmarks({ - favourited, - archived, - title, + query, + header, showDivider, showEditorCard = false, -}: ZGetBookmarksRequest & { - title: string; +}: { + query: ZGetBookmarksRequest; + header: React.ReactNode; showDivider?: boolean; showEditorCard?: boolean; }) { @@ -22,18 +22,13 @@ export default async function Bookmarks({ redirect("/"); } - const query = { - favourited, - archived, - }; - const bookmarks = await api.bookmarks.getBookmarks(query); return ( <div className="container flex flex-col gap-3"> - <div className="text-2xl">{title}</div> + {header} {showDivider && <hr />} - <BookmarksGrid + <UpdatableBookmarksGrid query={query} bookmarks={bookmarks} showEditorCard={showEditorCard} |
