diff --git a/src/components/domain/One/Labels.jsx b/src/components/domain/One/Labels.jsx index fc9f715..e2d64f3 100644 --- a/src/components/domain/One/Labels.jsx +++ b/src/components/domain/One/Labels.jsx @@ -8,6 +8,7 @@ function Labels() { const [showOne, setShowOne] = useState(false); const [showTwo, setShowTwo] = useState(false); + const [showThree, setShowThree] = useState(false); const showAnimate = useCallback(() => { const { currentTime, stopTime } = viewer.clock; @@ -18,10 +19,15 @@ function Labels() { if (leftTime < 20) { setShowOne(true); } else if (showOne) setShowOne(false); - if (leftTime < 5) { + + if (leftTime < 15) { setShowTwo(true); } else if (showTwo) setShowTwo(false); - }, [showOne, showTwo, viewer]); + + if (leftTime < 5) { + setShowThree(true); + } else if (showThree) setShowThree(false); + }, [showOne, showTwo, showThree, viewer]); useInterval(showAnimate, 300); @@ -40,7 +46,7 @@ function Labels() { - + + + + - +