Skip to content

Commit 60267e5

Browse files
Removed the likes from the article preview (#1186)
1 parent 8d1e300 commit 60267e5

File tree

1 file changed

+2
-13
lines changed

1 file changed

+2
-13
lines changed

components/ArticlePreview/ArticlePreview.tsx

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import { Temporal } from "@js-temporal/polyfill";
77
import {
88
BookmarkIcon,
99
EllipsisHorizontalIcon,
10-
HeartIcon,
1110
} from "@heroicons/react/20/solid";
1211
import {
1312
Menu,
@@ -56,16 +55,15 @@ const ArticlePreview: NextPage<Props> = ({
5655
menuOptions,
5756
showBookmark = true,
5857
bookmarkedInitialState = false,
59-
likes,
6058
}) => {
6159
const { data: session } = useSession();
6260
const [bookmarked, setIsBookmarked] = useState(bookmarkedInitialState);
6361
const howManySavedToShow = 3;
64-
const { data: bookmarksData, refetch } = api.post.myBookmarks.useQuery(
62+
63+
const { refetch } = api.post.myBookmarks.useQuery(
6564
{ limit: howManySavedToShow },
6665
{ enabled: !!session },
6766
);
68-
const bookmarks = bookmarksData?.bookmarks;
6967
const dateTime = Temporal.Instant.from(new Date(date).toISOString());
7068
const readableDate = dateTime.toLocaleString(["en-IE"], {
7169
year: "numeric",
@@ -128,15 +126,6 @@ const ArticlePreview: NextPage<Props> = ({
128126
<>
129127
<span aria-hidden="true">&middot;</span>
130128
<span>{readTime} min read</span>
131-
{likes && (
132-
<>
133-
<span aria-hidden="true">&middot;</span>
134-
<span data-likes={likes}>{likes}</span>
135-
<HeartIcon
136-
className={`relative top-[1px] h-3.5 w-3.5 fill-red-400`}
137-
/>
138-
</>
139-
)}
140129
</>
141130
)}
142131
<div className="flex items-center justify-start"></div>

0 commit comments

Comments
 (0)