Skip to content

Commit 07127eb

Browse files
committed
refactor: use button icon for like button
1 parent 0d46806 commit 07127eb

File tree

1 file changed

+6
-12
lines changed

1 file changed

+6
-12
lines changed

app/pages/package/[[org]]/[name].vue

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -624,19 +624,13 @@ onKeyStroke(
624624
likesData?.userHasLiked ? $t('package.likes.unlike') : $t('package.likes.like')
625625
"
626626
:aria-pressed="likesData?.userHasLiked"
627+
:classicon="
628+
likesData?.userHasLiked
629+
? 'i-lucide-heart-minus text-red-500'
630+
: 'i-lucide-heart-plus'
631+
"
627632
>
628-
<span
629-
:class="
630-
likesData?.userHasLiked
631-
? 'i-lucide-heart-minus text-red-500'
632-
: 'i-lucide-heart-plus'
633-
"
634-
class="w-4 h-4"
635-
aria-hidden="true"
636-
/>
637-
<span>{{
638-
formatCompactNumber(likesData?.totalLikes ?? 0, { decimals: 1 })
639-
}}</span>
633+
{{ formatCompactNumber(likesData?.totalLikes ?? 0, { decimals: 1 }) }}
640634
</ButtonBase>
641635
</TooltipApp>
642636
<template #fallback>

0 commit comments

Comments
 (0)