"use client"; import { useState, useEffect } from "react"; import Link from "next/link"; import Image from "next/image"; interface HeroProps { title: string; subtitle: string; description: string; cta: string; ctaHref: string; } const heroImages = [ { src: "/images/heroshots/MKE_1996.JPG", alt: "BB-Apartment Hero 1" }, { src: "/images/heroshots/MKE_1959.JPG", alt: "BB-Apartment Hero 2" }, { src: "/images/heroshots/MKE_1974.jpg", alt: "BB-Apartment Hero 3" }, ]; export function Hero({ title, subtitle, description, cta, ctaHref }: HeroProps) { const [activeIndex, setActiveIndex] = useState(0); useEffect(() => { const interval = setInterval(() => { setActiveIndex((prev) => (prev + 1) % heroImages.length); }, 5000); return () => clearInterval(interval); }, []); return (
{heroImages.map((image, index) => (
{image.alt}
))}

{subtitle}

{title}

{description && (

{description}

)} {cta}
{heroImages.map((_, index) => (
); }