import { useEffect, useRef } from "react"; import { gsap } from "gsap"; import { SplitText } from "@/plugins"; import Home7sh1 from "../../../public/assets/imgs/home-7/sh-1.jpg"; import Home7sh2 from "../../../public/assets/imgs/home-7/sh-2.jpg"; import Home7sh3 from "../../../public/assets/imgs/home-7/sh-3.jpg"; import Home7sh4 from "../../../public/assets/imgs/home-7/sh-4.jpg"; import Home7scroll from "../../../public/assets/imgs/home-7/scroll.png"; import Home7shape6 from "../../../public/assets/imgs/home-7/shape-6.png"; import Image from "next/image.js"; const CreativeAgencyHero = () => { const creativeSection = useRef(); const solutionSection = useRef(); const heroContentSection = useRef(); const heroThumAnim = useRef(); useEffect(() => { if (typeof window !== "undefined") { let tHero = gsap.context(() => { let hero7_thum_anim = heroThumAnim.current; if (hero7_thum_anim) { gsap.from(".image-1", { x: 65, yPercent: 100, opacity: 0, duration: 2, delay: 1, }); gsap.from(".image-2", { delay: 1.5, scale: 0, duration: 1.5, }); gsap.from(".image-3", { x: 65, yPercent: -100, duration: 2, opacity: 0, delay: 1, }); gsap.from(".image-4", { xPercent: -100, yPercent: -100, duration: 2, opacity: 0, delay: 1, }); } let split_creative = new SplitText(creativeSection.current, { type: "chars", }); let split_solution = new SplitText(solutionSection.current, { type: "chars", }); let split_herocontent = new SplitText(heroContentSection.current, { type: "chars words", }); gsap.from(split_creative.chars, { duration: 1, x: 70, autoAlpha: 0, stagger: 0.1, }); gsap.from( split_solution.chars, { duration: 1, x: 70, autoAlpha: 0, stagger: 0.1 }, "-=1.5" ); gsap.from( split_herocontent.words, { duration: 1, x: 50, autoAlpha: 0, stagger: 0.05 }, "-=1" ); }); return () => tHero.revert(); } }, []); return ( <>
Image Image Image Image

Creative{" "} Solution {" "}

{" "} We take a similar approach to design commercial we do impactfully approches over the flowchart of user friendly wireframe.

scroll Image
Shape Image
); }; export default CreativeAgencyHero;