"use client"; import { images } from "@/lib/assets"; import { cn } from "@/lib/utils"; import Image from "next/image"; import { useEffect, useState } from "react"; import { Heading } from "./ui/heading"; import { Button } from "./ui/button"; import { routes } from "@/lib/routes"; import Link from "next/link"; export const SlideShow = () => { const [currentImageIndex, setCurrentImageIndex] = useState(0); const [hasInteracted, setHasInteracted] = useState(false); useEffect(() => { if (hasInteracted) return; const timer = setTimeout( () => setCurrentImageIndex((i) => (i === images.length - 1 ? 0 : i + 1)), 7000 ); return () => clearInterval(timer); }, [currentImageIndex, hasInteracted]); return (
hero

Summer Sale

Save up to 50% on our entire range

Over 100 products discounted

{images.map((_, i) => ( ))}
); }; const Indicator = ({ filled }: { filled: boolean }) => { return (
); }; SlideShow.Indicator = Indicator;