"use client"; import Image from "next/image"; import Link from "next/link"; import { useState, useEffect } from "react"; export default function Home() { // Slideshow images array const slideshowImages = [ { src: "/images/home/slideshow/pet1.jpg", alt: "Happy pets" }, { src: "/images/home/slideshow/pet2.jpg", alt: "Pet supplies" }, { src: "/images/home/slideshow/pet3.jpg", alt: "Pet grooming" }, { src: "/images/home/slideshow/pet4.jpg", alt: "Pet food" }, ]; const [currentSlide, setCurrentSlide] = useState(0); // Auto-advance slideshow useEffect(() => { //Change slide every 7.5 seconds const timer = setInterval(() => {setCurrentSlide((prev) => (prev + 1) % slideshowImages.length);}, 7500); return () => clearInterval(timer); }, [slideshowImages.length]); // Four images that link to other pages const navImages = [ { src: "/images/home/navimages/adopt.jpg", alt: "Adopt a Pet", link: "/adopt", title: "Adopt a Pet" }, { src: "/images/home/navimages/store.jpg", alt: "Online Store", link: "/store", title: "Online Store" }, { src: "/images/home/navimages/appointments.jpg", alt: "Appointments", link: "/appointments", title: "Appointments" }, { src: "/images/home/navimages/about.jpg", alt: "About Us", link: "/about", title: "About Us" }, ]; return (
{/* Slideshow Section */}
{slideshowImages.map((image, index) => (
{image.alt}
))}
{/* Centered Title Section */}

Welcome to Leon's Pet Store

Your One-Stop Shop for All Things Pets

{/* Four Image Links Section */}
{navImages.map((item, index) => (
{item.alt}

{item.title}

))}
); }