import { useEffect, useRef } from "react"; import { gsap } from "gsap"; import { ScrollTrigger } from "@/plugins"; import Link from "next/link"; gsap.registerPlugin(ScrollTrigger); const ModernAgencyPortfolio = () => { const hoverWrap = useRef(); useEffect(() => { if (typeof window !== "undefined") { const hover_title = hoverWrap.current; if (hover_title) { function hoverImgFunc(event, hover_title) { const contentBox = hover_title.getBoundingClientRect(); const dx = event.clientX - contentBox.x; const dy = event.clientY - contentBox.y; hover_title.children[0].style.transform = `translate(${dx}px, ${dy}px)`; } hover_title.addEventListener("mousemove", (event) => { setInterval(hoverImgFunc(event, hover_title), 1000); }); } let device_width = window.innerWidth; let tHero = gsap.context(() => { gsap.set(".fade_bottom_2", { y: 30, opacity: 0 }); if (device_width < 1023) { const fadeArray = gsap.utils.toArray(".fade_bottom_2"); fadeArray.forEach((item, i) => { let fadeTl = gsap.timeline({ scrollTrigger: { trigger: item, start: "top center+=200", }, }); fadeTl.to(item, { y: 0, opacity: 1, ease: "power2.out", duration: 1.5, }); }); } else { gsap.to(".fade_bottom_2", { scrollTrigger: { trigger: ".fade_bottom_2", start: "top center+=300", markers: false, }, y: 0, opacity: 1, ease: "power2.out", duration: 1, stagger: { each: 0.2, }, }); } }); return () => tHero.revert(); } }, []); return ( <>
{" "} We’re a design and technology partner for digital age. We help businesses into innovation and remain highly relevant to their customers by developing cutting edge digital products and executing smart and valuable service by Axtra template on themeforest at the begining stage. Our exceptional digital products, offers, services and brand communication solution from idea to a product creating successful digital services for innovative startups and established businesses with trendy UX/UI design front and back-end development.
Read More{" "}