// MovingLogos.js "use client"; import { useEffect } from "react"; import Image from "next/image"; import logobrand2 from "../../public/images/logobrand/2.png"; import logobrand3 from "../../public/images/logobrand/3.png"; import logobrand4 from "../../public/images/logobrand/4.png"; import logobrand5 from "../../public/images/logobrand/5.png"; import logobrand6 from "../../public/images/logobrand/6.png"; import logobrand7 from "../../public/images/logobrand/7.png"; // import styles from "./MovingLogos.module.css"; const MovingLogos = () => { const logos = [ { id: 1, logo: logobrand5 }, { id: 2, logo: logobrand4 }, { id: 3, logo: logobrand3 }, { id: 4, logo: logobrand6 }, { id: 5, logo: logobrand5 }, { id: 6, logo: logobrand4 }, { id: 7, logo: logobrand3 }, { id: 8, logo: logobrand2 }, { id: 9, logo: logobrand5 }, { id: 10, logo: logobrand4 }, { id: 11, logo: logobrand3 }, { id: 12, logo: logobrand6 }, { id: 13, logo: logobrand5 }, { id: 14, logo: logobrand4 }, { id: 15, logo: logobrand6 }, { id: 16, logo: logobrand2 }, { id: 17, logo: logobrand7 }, { id: 18, logo: logobrand4 }, { id: 19, logo: logobrand3 }, { id: 20, logo: logobrand2 }, { id: 21, logo: logobrand7 }, { id: 22, logo: logobrand4 }, { id: 23, logo: logobrand3 }, { id: 24, logo: logobrand5 }, { id: 25, logo: logobrand2 }, { id: 26, logo: logobrand7 }, ]; useEffect(() => { const moveLogos = () => { logos.forEach((logo) => { const logoElement = document.getElementById(`logo-${logo.id}`); if (logoElement) { logoElement.style.transform = "translateX(-10px)"; // Adjust the value based on your preference } }); }; const intervalId = setInterval(moveLogos, 100); // Adjust the interval duration based on your preference return () => clearInterval(intervalId); }, [logos]); return (
{/* {logos.map((e) => (
{`Logo
))} */}
    {logos.map((e, index) => (
  • {`Logo
  • ))}
); }; export default MovingLogos;