Files
GNX-WEB/gnx-react/components/shared/layout/animations/SmoothScroll.tsx
Iliyan Angelov fe26b7cca4 GNXSOFT.COM
2025-09-26 00:15:37 +03:00

21 lines
471 B
TypeScript

"use client";
import { useEffect } from "react";
import { gsap } from "gsap";
import { ScrollTrigger } from "gsap/dist/ScrollTrigger";
import Lenis from "lenis";
const SmoothScroll = () => {
useEffect(() => {
gsap.registerPlugin(ScrollTrigger);
const lenis = new Lenis();
gsap.ticker.add((time) => {
lenis.raf(time * 350);
});
gsap.ticker.lagSmoothing(0);
ScrollTrigger.update();
}, []);
return null;
};
export default SmoothScroll;