mirror of
https://github.com/cupcakearmy/old.nicco.io.git
synced 2025-02-22 10:19:23 +00:00
remove unecessary
This commit is contained in:
parent
3a2ee3cd7c
commit
7b5f7cfe86
@ -1,8 +0,0 @@
|
|||||||
import React, { Suspense } from 'react'
|
|
||||||
|
|
||||||
|
|
||||||
const Suspend: (C: React.ComponentType) => React.ComponentType = (C) => () => {
|
|
||||||
return <Suspense fallback={<span>...</span>} children={<C/>}/>
|
|
||||||
}
|
|
||||||
|
|
||||||
export default Suspend
|
|
@ -1,5 +1,10 @@
|
|||||||
import React, { useEffect, useRef, useState } from 'react'
|
import React, { useEffect, useRef, useState } from 'react'
|
||||||
import LetterAnimation from '../Components/LetterAnimation'
|
|
||||||
|
import LetterAnimation from '../components/LetterAnimation'
|
||||||
|
|
||||||
|
import '../styles/Letters.styl'
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
type Pair = [string, string]
|
type Pair = [string, string]
|
||||||
|
|
||||||
@ -16,7 +21,6 @@ const Letters: React.FC = React.memo(() => {
|
|||||||
const [index, setIndex] = useState<number>(0)
|
const [index, setIndex] = useState<number>(0)
|
||||||
const wrapper = useRef<HTMLElement>(null)
|
const wrapper = useRef<HTMLElement>(null)
|
||||||
|
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
setTimeout(
|
setTimeout(
|
||||||
() => setIndex((index < pairs.length - 1) ? index + 1 : 0),
|
() => setIndex((index < pairs.length - 1) ? index + 1 : 0),
|
||||||
@ -25,8 +29,9 @@ const Letters: React.FC = React.memo(() => {
|
|||||||
}, [index])
|
}, [index])
|
||||||
|
|
||||||
return <span id={'letters-wrapper'} ref={wrapper}>
|
return <span id={'letters-wrapper'} ref={wrapper}>
|
||||||
<LetterAnimation text={pairs[index][0] + '.'}/>
|
<LetterAnimation text={pairs[index][0] + '.'} />
|
||||||
<LetterAnimation text={pairs[index][1] + '.'} delay={500}/>
|
<br />
|
||||||
|
<LetterAnimation text={pairs[index][1] + '.'} delay={500} />
|
||||||
</span>
|
</span>
|
||||||
})
|
})
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user