import React, { useRef, useEffect } from "react" import gsap from "gsap" const Loader = () => { let arrow = useRef([]) useEffect(() => { var tl = new gsap.timeline({ repeat: -1 }) tl.fromTo( arrow.current, { y: 0, color: "#3b3b4f", }, { y: -50, color: "#d0d0d5", stagger: 0.1, duration: 0.5, ease: "Linear.easeNone", } ) tl.add("cp") tl.fromTo( arrow.current, { y: -50, color: "#d0d0d5", }, { y: 0, color: "#3b3b4f", stagger: 0.1, duration: 0.5, ease: "Linear.easeNone", }, "cp-=0.3" ) }) return (