diff --git a/app/components/Package/Likes.vue b/app/components/Package/Likes.vue index e48f543e62..507d5cf136 100644 --- a/app/components/Package/Likes.vue +++ b/app/components/Package/Likes.vue @@ -68,6 +68,8 @@ const topLikedBadgeLabel = computed(() => const isLikeActionPending = shallowRef(false) +const isCountTruncated = computed(() => (likesData.value?.totalLikes ?? 0) >= 1000) + const likeAction = async () => { if (user.value?.handle == null) { authModal.open() @@ -154,7 +156,18 @@ const likeAction = async () => { class="i-svg-spinners:ring-resize w-3 h-3 my-0.5" aria-hidden="true" /> - {{ compactNumberFormatter.format(likesData?.totalLikes ?? 0) }} + + {{ compactNumberFormatter.format(likesData?.totalLikes ?? 0) }} + + + + + diff --git a/app/composables/atproto/useProfileLikes.ts b/app/composables/atproto/useProfileLikes.ts deleted file mode 100644 index 30bbba1c93..0000000000 --- a/app/composables/atproto/useProfileLikes.ts +++ /dev/null @@ -1,13 +0,0 @@ -export type LikesResult = { - records: { - value: { - subjectRef: string - } - }[] -} - -export function useProfileLikes(handle: MaybeRefOrGetter) { - const asyncData = useLazyFetch(() => `/api/social/profile/${toValue(handle)}/likes`) - - return asyncData -} diff --git a/app/pages/profile/[identity]/index.vue b/app/pages/profile/[identity]/index.vue index 61ca0f69eb..11ffde31b0 100644 --- a/app/pages/profile/[identity]/index.vue +++ b/app/pages/profile/[identity]/index.vue @@ -1,5 +1,6 @@