All checks were successful
Deploy with Docker Compose / deploy (push) Successful in 3m36s
30 lines
1002 B
TypeScript
30 lines
1002 B
TypeScript
import NavigationWrapper from "@/components/navigation/NavigationWrapper";
|
|
import HeroSection from "@/components/layout/HeroSection";
|
|
import EventsSection from "@/components/events/EventsSection";
|
|
import { eventService } from "@/services/events/event.service";
|
|
import { getBackgroundImage } from "@/lib/preferences";
|
|
|
|
export const dynamic = "force-dynamic";
|
|
|
|
export default async function Home() {
|
|
// Paralléliser les appels DB
|
|
const [events, backgroundImage] = await Promise.all([
|
|
eventService.getUpcomingEvents(3),
|
|
getBackgroundImage("home", "/got-2.jpg"),
|
|
]);
|
|
|
|
// Convert Date objects to strings for serialization
|
|
const serializedEvents = events.map((event) => ({
|
|
...event,
|
|
date: event.date.toISOString(),
|
|
}));
|
|
|
|
return (
|
|
<main className="min-h-screen relative" style={{ backgroundColor: "var(--background)" }}>
|
|
<NavigationWrapper />
|
|
<HeroSection backgroundImage={backgroundImage} />
|
|
<EventsSection events={serializedEvents} />
|
|
</main>
|
|
);
|
|
}
|