From b1f35c9953b8468fccf37401ffd82555255a3857 Mon Sep 17 00:00:00 2001 From: Wanjohi <71614375+wanjohiryan@users.noreply.github.com> Date: Sun, 15 Sep 2024 01:02:42 +0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix:=20Fix=20loading=20animation?= =?UTF-8?q?=20for=20images?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/www/src/routes/index.tsx | 1 + packages/ui/src/card.tsx | 19 +++++++++---------- packages/ui/src/image/basic-image-loader.tsx | 11 ++++++----- 3 files changed, 16 insertions(+), 15 deletions(-) diff --git a/apps/www/src/routes/index.tsx b/apps/www/src/routes/index.tsx index 79bf2f02..f7eaeaf1 100644 --- a/apps/www/src/routes/index.tsx +++ b/apps/www/src/routes/index.tsx @@ -180,6 +180,7 @@ export default component$(() => { {games.map((game, index) => ( game.titleWidth ? ( { +interface Props extends PropsOf<"div"> { game: { name: string; id: number; @@ -37,11 +37,13 @@ export const Card = component$(({ titleWidth, titleHeight, game, size, ...props }); return ( - + {size === "large" ? ( + >
@@ -77,7 +79,7 @@ export const Card = component$(({ titleWidth, titleHeight, game, size, ...props ) : size == "small" ? ( + >

{game.name}

@@ -85,7 +87,7 @@ export const Card = component$(({ titleWidth, titleHeight, game, size, ...props
) : ( - - + + )} { <> {!imageLoaded.value && !hasError.value && (
)}