From 60267e5029932ce0016f1d8a64e6896bf3e1e916 Mon Sep 17 00:00:00 2001 From: Niall Maher Date: Mon, 28 Oct 2024 22:19:48 +0000 Subject: [PATCH] Removed the likes from the article preview (#1186) --- components/ArticlePreview/ArticlePreview.tsx | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/components/ArticlePreview/ArticlePreview.tsx b/components/ArticlePreview/ArticlePreview.tsx index fe33136b..559451a8 100644 --- a/components/ArticlePreview/ArticlePreview.tsx +++ b/components/ArticlePreview/ArticlePreview.tsx @@ -7,7 +7,6 @@ import { Temporal } from "@js-temporal/polyfill"; import { BookmarkIcon, EllipsisHorizontalIcon, - HeartIcon, } from "@heroicons/react/20/solid"; import { Menu, @@ -56,16 +55,15 @@ const ArticlePreview: NextPage = ({ menuOptions, showBookmark = true, bookmarkedInitialState = false, - likes, }) => { const { data: session } = useSession(); const [bookmarked, setIsBookmarked] = useState(bookmarkedInitialState); const howManySavedToShow = 3; - const { data: bookmarksData, refetch } = api.post.myBookmarks.useQuery( + + const { refetch } = api.post.myBookmarks.useQuery( { limit: howManySavedToShow }, { enabled: !!session }, ); - const bookmarks = bookmarksData?.bookmarks; const dateTime = Temporal.Instant.from(new Date(date).toISOString()); const readableDate = dateTime.toLocaleString(["en-IE"], { year: "numeric", @@ -128,15 +126,6 @@ const ArticlePreview: NextPage = ({ <> {readTime} min read - {likes && ( - <> - - {likes} - - - )} )}