import React, { useEffect, useRef, useState } from 'react' import LetterAnimation from '../components/LetterAnimation' import '../styles/Letters.styl' type Pair = [string, string] const pairs: Pair[] = [ ['visualize', 'create'], ['invision', 'build'], ['ideate', 'deploy'], ] export const Duration = 4000 const Letters: React.FC = React.memo(() => { const [index, setIndex] = useState(0) const wrapper = useRef(null) useEffect(() => { setTimeout( () => setIndex((index < pairs.length - 1) ? index + 1 : 0), Duration, ) }, [index]) return
}) export default Letters