From bb44cef6762e59f32fcf842842876a5d6941ee40 Mon Sep 17 00:00:00 2001 From: Philippe Serhal Date: Tue, 3 Mar 2026 20:19:15 -0500 Subject: [PATCH 1/3] fix: show skeleton instead of 0 in like cards while loading Like cards showed totalLikes: 0 default before the client-side fetch resolved, causing a visible 0 -> X jump. Now shows a pulse skeleton and neutral heart icon during the pending state. --- app/components/Package/LikeCard.vue | 16 +++++++++++----- test/nuxt/components/PackageLikeCard.spec.ts | 19 +++++++++++++++++++ 2 files changed, 30 insertions(+), 5 deletions(-) diff --git a/app/components/Package/LikeCard.vue b/app/components/Package/LikeCard.vue index 032a77a1b0..4b1dcc7c34 100644 --- a/app/components/Package/LikeCard.vue +++ b/app/components/Package/LikeCard.vue @@ -17,7 +17,7 @@ const { user } = useAtproto() const authModal = useModal('auth-modal') -const { data: likesData } = useFetch(() => `/api/social/likes/${name.value}`, { +const { data: likesData, status: likesStatus } = useFetch(() => `/api/social/likes/${name.value}`, { default: () => ({ totalLikes: 0, userHasLiked: false }), server: false, }) @@ -92,14 +92,20 @@ const likeAction = async () => { >