"use client"; /** * CompanyLogos Component * * Displays an infinite-scrolling banner of company logos after the header. * Features smooth horizontal animation with reduced motion support. * * Requirements: 3.1, 3.2, 3.3, 3.4, 3.5, 3.6, 3.7, 3.8 */ import { motion } from "framer-motion"; import Image from "next/image"; import { useReducedMotion } from "@/app/hooks/useReducedMotion"; // TypeScript interface for company logos export interface CompanyLogo { name: string; // Company name imagePath: string; // Path to logo image (SVG preferred) alt: string; // Alt text for accessibility } // Company logos data const companies: CompanyLogo[] = [ { name: "Apolo Energia", imagePath: "/logos/apolo.svg", alt: "Apolo Energia logo", }, { name: "Julia Beauty Lashes", imagePath: "/logos/julia.svg", alt: "Julia Beauty Lashes logo", }, { name: "Innovo", imagePath: "/logos/innovo.svg", alt: "Innovo logo", }, { name: "TeraByteShop", imagePath: "/logos/terabyte.svg", alt: "TeraByteShop logo", }, { name: "Pichau", imagePath: "/logos/pichau.svg", alt: "Pichau logo", }, ]; export default function CompanyLogos() { const shouldReduceMotion = useReducedMotion(); // Duplicate logo array for seamless infinite scroll const duplicatedLogos = [...companies, ...companies]; // Static grid for reduced motion preference if (shouldReduceMotion) { return ( {companies.map((logo) => ( ))} ); } // Animated infinite scroll return ( {duplicatedLogos.map((logo, index) => ( ))} ); }