From ceea6ab8bf2bd7368ed3bd2a231d67cd0e6cd664 Mon Sep 17 00:00:00 2001 From: Alexander Medvedev Date: Sun, 26 Apr 2026 10:41:39 +0200 Subject: [PATCH] chore: make inital screenshot delay instant --- src/components/PluginCard.tsx | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/components/PluginCard.tsx b/src/components/PluginCard.tsx index bc747eb..248ba09 100644 --- a/src/components/PluginCard.tsx +++ b/src/components/PluginCard.tsx @@ -67,11 +67,10 @@ const PluginCard = ({ plugin }: { plugin: any }) => { setIsHovering(true); if (slideshowImages.length <= 1) return; - timerRef.current = setTimeout(() => { - cycleRef.current = setInterval(() => { - setCurrentIndex(prev => (prev + 1) % slideshowImages.length); - }, 2000); - }, 200); + const next = () => setCurrentIndex(prev => (prev + 1) % slideshowImages.length); + + next(); // Trigger first transition instantly + cycleRef.current = setInterval(next, 2000); }; const stopHover = () => { @@ -110,7 +109,6 @@ const PluginCard = ({ plugin }: { plugin: any }) => { )} -
{plugin.category} {plugin.type === 'free' ? (