import Link from "next/link"; import { useEffect, useRef } from "react"; import VideoFrame from "../../../public/assets/imgs/essential-img/video-frame.png"; import SvgStar from "../../../public/assets/imgs/essential-img/svgstar.png"; import Shape24 from "../../../public/assets/imgs/shape/24.png"; import Image from "next/image"; const ModernAgencySingleImage = () => { const hoverImage = useRef(); const hoverImage2 = useRef(); const hoverWrap = useRef(); useEffect(() => { if (typeof window !== "undefined") { const hover_8_wrap = hoverWrap.current.children; const h8_wrap_len = hover_8_wrap.length; if (h8_wrap_len == 1) { function showCase8Func(event, hover_8_wrap) { const contentBox = hover_8_wrap[0].getBoundingClientRect(); const dx = event.pageX; const dy = event.clientY - contentBox.y; hoverImage.current.style.transform = `translate(${dx}px, ${dy}px)`; } hover_8_wrap[0].addEventListener("mousemove", (event) => { setInterval(showCase8Func(event, hover_8_wrap), 1000); hoverImage.current.classList.add("active"); }); hover_8_wrap[0].addEventListener("mouseout", (event) => { hoverImage.current.classList.remove("active"); }); } if (h8_wrap_len == 2) { function showCase8Func(event, hover_8_wrap) { const contentBox = hover_8_wrap[0].getBoundingClientRect(); const dx = event.pageX; const dy = event.clientY - contentBox.y; hoverImage.current.style.transform = `translate(${dx}px, ${dy}px)`; } hover_8_wrap[0].addEventListener("mousemove", (event) => { setInterval(showCase8Func(event, hover_8_wrap), 1000); hoverImage.current.classList.add("active"); }); hover_8_wrap[0].addEventListener("mouseout", (event) => { hoverImage.current.classList.remove("active"); }); function showCase8Func2(event, hover_8_wrap) { const contentBox = hover_8_wrap[1].getBoundingClientRect(); const dx = event.pageX; const dy = event.clientY - contentBox.y; hoverImage2.current.style.transform = `translate(${dx}px, ${dy}px)`; } hover_8_wrap[1].addEventListener("mousemove", (event) => { setInterval(showCase8Func2(event, hover_8_wrap), 1000); hoverImage2.current.classList.add("active"); }); hover_8_wrap[1].addEventListener("mouseout", (event) => { hoverImage2.current.classList.remove("active"); }); } } }, []); return ( <>
Creating a successful digital services for innovative start-up and{" "}
established businesses with trendy design front and back-end{" "}
development.