Browse Source

feat : utm 타이머 추가

remotes/origin/main
이시연 2 weeks ago
parent
commit
ca1bccb1fa
  1. 8
      src/pages/utm/IntroPage.jsx

8
src/pages/utm/IntroPage.jsx

@ -108,6 +108,8 @@ const INTRO_PHASE_DURATION = {
done: 2000, done: 2000,
}; };
const TAB_DURATION = [5000, 7500, 7500, 5000]; // , , ,
const EVO_ITEMS = [ const EVO_ITEMS = [
{ {
img: `${basePath}images/utm_intro_drone.png`, img: `${basePath}images/utm_intro_drone.png`,
@ -482,6 +484,12 @@ function IntroPage() {
}; };
}, [activeIndex]); }, [activeIndex]);
useEffect(() => {
const t = setTimeout(() => {
setActiveIndex((prev) => (prev + 1) % UTM_WHAT_LEFT.length);
}, TAB_DURATION[activeIndex]);
return () => clearTimeout(t);
}, [activeIndex]);
return ( return (
<article ref={ref}> <article ref={ref}>
<SubHero <SubHero

Loading…
Cancel
Save