"use client"; import { useEffect, useRef } from 'react'; import { gsap } from 'gsap'; const CustomCursor = ({ isHoveringButton }) => { const cursorRef = useRef(null); useEffect(() => { const moveCursor = (e) => { const { clientX: x, clientY: y } = e; gsap.to(cursorRef.current, { x: x - 16, y: y - 16, duration: 0.1, ease: "power3.out", }); }; window.addEventListener('mousemove', moveCursor); return () => { window.removeEventListener('mousemove', moveCursor); }; }, []); return ( <>
> ); }; export default CustomCursor;