fix carousel bug

Kim committed Mar 23, 2026 at 13:45 UTC 850aea7eb0ecce9cfcb0bb0ad84f6b1f8e8d11d5
1 file changed +3 -10
frontend/src/components/LandingHero.tsx
+3 -10
@@ -64,7 +64,6 @@ export function LandingHero() {
64 const carouselLoopBoundaryIndex = carouselCardCount + 1;
65 const carouselTransitionDurationMs = 700;
66 const [reduceMotion, setReduceMotion] = useState(false);
67 - const [isHovered, setIsHovered] = useState(false);
67 const [isDragging, setIsDragging] = useState(false);
68 const [trackIndex, setTrackIndex] = useState(1);
69 const [transitionEnabled, setTransitionEnabled] = useState(true);
@@ -141,7 +140,7 @@ export function LandingHero() {
140 }, []);
141
142 useEffect(() => {
144 - if (reduceMotion || isHovered || isDragging) {
143 + if (reduceMotion || isDragging) {
144 return;
145 }
146
@@ -159,7 +158,7 @@ export function LandingHero() {
158 return () => {
159 window.clearInterval(interval);
160 };
162 - }, [carouselLoopBoundaryIndex, isDragging, isHovered, reduceMotion]);
161 + }, [carouselLoopBoundaryIndex, isDragging, reduceMotion]);
162
163 useEffect(() => {
164 if (transitionEnabled) {
@@ -324,13 +323,7 @@ export function LandingHero() {
323
324 <div className="relative mt-10 -mx-4 w-auto sm:-mx-6 md:-mx-8">
325 <div className="overflow-hidden border-b border-border/80 bg-transparent">
327 - <div
328 - className="relative mx-auto max-w-7xl px-3 py-6 sm:px-6 sm:py-8"
329 - onMouseEnter={() => setIsHovered(true)}
330 - onMouseLeave={() => setIsHovered(false)}
331 - onFocusCapture={() => setIsHovered(true)}
332 - onBlurCapture={() => setIsHovered(false)}
333 - >
326 + <div className="relative mx-auto max-w-7xl px-3 py-6 sm:px-6 sm:py-8">
327 <div className="pointer-events-none absolute inset-x-0 top-6 flex justify-center sm:top-8">
328 <div className="h-28 w-28 rounded-full bg-primary/16 blur-3xl dark:bg-primary/22" />
329 </div>