diff --git a/surfsense_web/components/onboarding-tour.tsx b/surfsense_web/components/onboarding-tour.tsx index e097c212d..4204928ce 100644 --- a/surfsense_web/components/onboarding-tour.tsx +++ b/surfsense_web/components/onboarding-tour.tsx @@ -695,6 +695,10 @@ export function OnboardingTour() { setIsActive(false); }, [user?.id]); + const handleAnimationEnd = useCallback(() => { + setShouldAnimate(false); + }, []); + // Handle escape key useEffect(() => { const handleKeyDown = (e: KeyboardEvent) => { @@ -767,7 +771,7 @@ export function OnboardingTour() { onSkip={handleSkip} isDarkMode={isDarkMode} shouldAnimate={shouldAnimate} - onAnimationEnd={() => setShouldAnimate(false)} + onAnimationEnd={handleAnimationEnd} /> )}