()
| 64 | }, [index]); |
| 65 | |
| 66 | const resetInterval = () => { |
| 67 | if (interval.current != null) { |
| 68 | clearInterval(interval.current); |
| 69 | } |
| 70 | interval.current = setInterval(() => { |
| 71 | setIndex((i) => (i = (i + 1) % infoBoxData.length)); |
| 72 | }, autoplayDuration); |
| 73 | }; |
| 74 | |
| 75 | useEffect(() => { |
| 76 | resetInterval(); |
no outgoing calls
no test coverage detected