()
| 331 | } |
| 332 | |
| 333 | const startNextPhrase = () => { |
| 334 | const phrase = PHRASES_TO_TYPE[currentPhraseIndex] |
| 335 | |
| 336 | // Reset text before starting new phrase |
| 337 | setTypingText('') |
| 338 | |
| 339 | // Small delay before starting to type the next phrase |
| 340 | setTimeout(() => { |
| 341 | typePhrase(phrase, () => { |
| 342 | // Move to next phrase (cycle back to beginning if needed) |
| 343 | currentPhraseIndex = |
| 344 | (currentPhraseIndex + 1) % PHRASES_TO_TYPE.length |
| 345 | startNextPhrase() |
| 346 | }) |
| 347 | }, 300) |
| 348 | } |
| 349 | |
| 350 | startNextPhrase() |
| 351 | } |
no test coverage detected