File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ const Morpher = ({
19
19
20
20
const morphTimeoutRef = useRef < NodeJS . Timeout | null > ( null )
21
21
const morphIntervalRef = useRef < NodeJS . Timeout | null > ( null )
22
- const counterRef = useRef ( 0 )
22
+ const counterRef = useRef ( 1 )
23
23
const wordsRef = useRef ( words )
24
24
const currentTextRef = useRef ( currentText )
25
25
const isAnimatingRef = useRef ( false )
@@ -117,10 +117,10 @@ const Morpher = ({
117
117
// If reduced motion is preferred, show static text cycling
118
118
if ( prefersReducedMotion ) {
119
119
morphIntervalRef . current = setInterval ( ( ) => {
120
- counterRef . current = ( counterRef . current + 1 ) % wordsRef . current . length
121
120
const nextWord = wordsRef . current [ counterRef . current ]
122
121
setCurrentText ( nextWord )
123
122
currentTextRef . current = nextWord
123
+ counterRef . current = ( counterRef . current + 1 ) % wordsRef . current . length
124
124
} , 3000 )
125
125
} else {
126
126
// Defer animation start by 2 seconds to improve initial page load
You can’t perform that action at this time.
0 commit comments