From 0aa4760f742471c282186f3b0580e66d2d370588 Mon Sep 17 00:00:00 2001 From: MohamedBassem Date: Thu, 22 Feb 2024 21:41:05 +0000 Subject: fix: Minor UI tweaks and fixing addition of first bookmark --- packages/web/app/dashboard/bookmarks/components/Bookmarks.tsx | 7 +------ packages/web/app/dashboard/bookmarks/components/BookmarksGrid.tsx | 3 +++ 2 files changed, 4 insertions(+), 6 deletions(-) (limited to 'packages/web/app/dashboard/bookmarks/components') diff --git a/packages/web/app/dashboard/bookmarks/components/Bookmarks.tsx b/packages/web/app/dashboard/bookmarks/components/Bookmarks.tsx index 44495f1f..d704b9d6 100644 --- a/packages/web/app/dashboard/bookmarks/components/Bookmarks.tsx +++ b/packages/web/app/dashboard/bookmarks/components/Bookmarks.tsx @@ -21,16 +21,11 @@ export default async function Bookmarks({ const bookmarks = await api.bookmarks.getBookmarks(query); - // TODO: This needs to be polished return ( <>
{title}
- {bookmarks.bookmarks.length == 0 ? ( - "No bookmarks" - ) : ( - - )} +
); diff --git a/packages/web/app/dashboard/bookmarks/components/BookmarksGrid.tsx b/packages/web/app/dashboard/bookmarks/components/BookmarksGrid.tsx index dc98472e..e07d48b6 100644 --- a/packages/web/app/dashboard/bookmarks/components/BookmarksGrid.tsx +++ b/packages/web/app/dashboard/bookmarks/components/BookmarksGrid.tsx @@ -21,6 +21,9 @@ export default function BookmarksGrid({ const { data } = api.bookmarks.getBookmarks.useQuery(query, { initialData: { bookmarks: initialBookmarks }, }); + if (data.bookmarks.length == 0) { + return

No bookmarks

; + } return (
{data.bookmarks.map((b) => renderBookmark(b))} -- cgit v1.2.3-70-g09d2