Skip to content

Commit

Permalink
fix tab switching error again
Browse files Browse the repository at this point in the history
  • Loading branch information
lassejaco committed Sep 25, 2024
1 parent 794f6a6 commit 89bfab2
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -193,9 +193,13 @@ const HighlightedSpeakers = ({
useEffect(() => {
if (isInView && !isHovered) {
const rotateInterval = setInterval(() => {
setCurrentIndex(prevIndex => (prevIndex + 4) % speakers.length)
controls.set({ scaleX: 0 })
controls.start({ scaleX: 1, transition: { duration: 6, ease: 'linear' } })
try {
setCurrentIndex(prevIndex => (prevIndex + 4) % speakers.length)
controls.set({ scaleX: 0 })
controls.start({ scaleX: 1, transition: { duration: 6, ease: 'linear' } })
} catch (error) {
console.error('Error in rotateInterval:', error)
}
}, 6000)

controls.start({ scaleX: 1, transition: { duration: 6, ease: 'linear' } })
Expand Down

0 comments on commit 89bfab2

Please sign in to comment.