// components/ClientLogosSection.tsx import React from "react"; import Image from "next/image"; // Define structure for client data - focusing on logos now type Client = { name: string; logoUrl: string; // Expecting actual logo URLs now }; type ClientLogosSectionProps = { title: string; description?: string; clients: Client[]; /** Control animation speed (lower number = faster). Default: 40s */ speed?: number; /** Size of the square background container in pixels. Default: 120 */ squareSize?: number; }; const ClientLogosSection: React.FC = ({ title, description, clients = [], // Default to empty array speed = 80, //Default speed in seconds for one full cycle squareSize = 120, // Default size for the square container (e.g., 120px) }) => { // Need at least one client to render the marquee if (clients.length === 0) { return null; // Or render a placeholder message if preferred } // Duplicate the clients for a seamless loop effect const extendedClients = [...clients, ...clients]; const squareDim = `${squareSize}px`; // Convert size to string for inline style const padding = Math.round(squareSize / 6); // Calculate padding based on size (adjust divisor as needed) const paddingDim = `${padding}px`; return (

{title}

{/* Marquee container - group allows pausing animation on hover */}
{/* Inner container that will animate */}
{extendedClients.map((client, index) => (
{/* Square Background Container */}
{`${client.name}
))}
{/* Optional: Add fade effect at the edges */}
{description && (

{description}

)}
); }; export const defaultClients: Client[] = [ { name: "ABSA", logoUrl: "/images/absa.png" }, { name: "SYBRIN", logoUrl: "/images/sybrin.svg" }, { name: "SASOL", logoUrl: "/images/sasol.png" }, { name: "JACARANDA", logoUrl: "/images/jacaranda.png" }, { name: "SALESFORCE", logoUrl: "/images/salesforce.png" }, { name: "BCX", logoUrl: "/images/bcx.png" }, { name: "TOYOTA", logoUrl: "/images/toyota-logo.png" }, ]; export default ClientLogosSection;