From 3b5d8214a2b487028e6a87cb6050988cd0b969e7 Mon Sep 17 00:00:00 2001 From: Sam Becker Date: Sat, 12 Jul 2025 10:38:01 -0500 Subject: [PATCH] Smooth out fallbacks on initial load --- src/components/image/ImageWithFallback.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/image/ImageWithFallback.tsx b/src/components/image/ImageWithFallback.tsx index 95d56957..b59e3f96 100644 --- a/src/components/image/ImageWithFallback.tsx +++ b/src/components/image/ImageWithFallback.tsx @@ -34,11 +34,11 @@ export default function ImageWithFallback({ useEffect(() => { isLoadingRef.current = isLoading; }, [isLoading]); useEffect(() => { const timeout = setTimeout(() => { - // If image is still loading after 200ms, force CSS animation + // If image is still loading after 150ms, force CSS animation if (isLoadingRef.current) { setFadeFallbackTransition(true); } - }, 200); + }, 150); return () => clearTimeout(timeout); }, []);