import { useState, useEffect, useCallback } from 'react'; import hero1 from "@/public/hero1.png"; import hero2 from "@/public/hero2.png"; import hero3 from "@/public/hero3.png"; const heroImages = [ hero1, hero2, hero3 ]; export default function Hero() { const [currentIndex, setCurrentIndex] = useState(0); const nextSlide = useCallback(() => { setCurrentIndex((prevIndex) => (prevIndex + 1) % heroImages.length); }, []); useEffect(() => { const timer = setInterval(() => { nextSlide(); }, 5000); return () => clearInterval(timer); }, [nextSlide]); return (
{heroImages.map((src, index) => (
{index === currentIndex && (
)}
))}

Magyarország szíve, tálalva egy tányéron

Éld át a hagyományos magyar konyha gazdag, autentikus ízeit egy modern, elegáns környezetben.

Asztalfoglalás
); }