import React, { FC } from 'react'; import { motion } from 'framer-motion'; interface MarqueeProps { gifs: string[]; } /** * Marquee Section: Two rows of scrolling GIFs. */ export const MarqueeSection: FC = ({ gifs }) => { // Helper function to create the full set of images for seamless looping const getRowImages = (gifs: string[], direction: 'right' | 'left') => { // Tripling the images for seamless scrolling const fullSet = [...gifs, ...gifs, ...gifs]; return fullSet.map((url, index) => (
{`Marquee
)); }; const row1Images = getRowImages(gifs.slice(0, 11), 'right'); const row2Images = getRowImages(gifs.slice(11), 'left'); return (
{/* Row 1: Moves RIGHT */}
{row1Images}
{/* Row 2: Moves LEFT */}
{row2Images}
); };