From e714e08299ff6d95f66c491869c0669e27932fbc Mon Sep 17 00:00:00 2001 From: Jaleel Bennett Date: Sat, 3 Aug 2024 23:20:23 -0400 Subject: [PATCH] feat(bookmarks-list): updated layout view fro row layout --- app/bookmarks/components/bookmark-list.tsx | 43 ++++++++++++++-------- 1 file changed, 28 insertions(+), 15 deletions(-) diff --git a/app/bookmarks/components/bookmark-list.tsx b/app/bookmarks/components/bookmark-list.tsx index 80c5cba..89504b5 100644 --- a/app/bookmarks/components/bookmark-list.tsx +++ b/app/bookmarks/components/bookmark-list.tsx @@ -153,6 +153,7 @@ export default function BookmarksList({ userId={userId} pathname={pathname} articleId={id} + layout={layout} /> )) ) : ( @@ -200,11 +201,13 @@ function BookmarkCard({ userId, articleId, pathname, + layout, }: { bookmark: Bookmark; userId: number; articleId: string; pathname: string; + layout: Layout; }) { const [dialogState, setDialogState] = useState< "closed" | "dropdown" | "alert" @@ -229,12 +232,18 @@ function BookmarkCard({ CN
- - {bookmark.authorName} - + {layout === "grid" ? ( + + {bookmark.authorName} + + ) : ( + + {bookmark.title} + + )}
{bookmark.readTime} {bookmark.publishDate && ยท} @@ -466,15 +475,19 @@ function BookmarkCard({
- - {bookmark.title} - - - {extractFirstSentence(bookmark.content)} - + {layout === "grid" ? ( + <> + + {bookmark.title} + + + {extractFirstSentence(bookmark.content)} + + + ) : null} );