diff --git a/src/pages/Anim.tsx b/src/pages/Anim.tsx new file mode 100644 index 0000000..5d26edd --- /dev/null +++ b/src/pages/Anim.tsx @@ -0,0 +1,133 @@ +"use client" +import { useEffect, useState } from "react" +import { useHistory } from "react-router-dom" + +export default function Welcome() { + const history = useHistory() + const [animationPhase, setAnimationPhase] = useState(0) + + useEffect(() => { + const timer1 = setTimeout(() => setAnimationPhase(1), 500) + const timer2 = setTimeout(() => setAnimationPhase(2), 1500) + const timer3 = setTimeout(() => setAnimationPhase(3), 2500) + // const timer4 = setTimeout(() => history.push("/login"), 4000) // Раскомментируйте при необходимости + + return () => { + clearTimeout(timer1) + clearTimeout(timer2) + clearTimeout(timer3) + // clearTimeout(timer4) + } + }, [history]) + + return ( +