From 03faa429f9342b4b5aa15d870b4e86ee5bf41650 Mon Sep 17 00:00:00 2001 From: MohamedBassem Date: Wed, 20 Mar 2024 18:26:59 +0000 Subject: fix(web): Greatly improve the search feeling by removing the flicker --- .../components/dashboard/bookmarks/Bookmarks.tsx | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) (limited to 'apps/web/components/dashboard/bookmarks/Bookmarks.tsx') 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 (
-
{title}
+ {header} {showDivider &&
} -