2026-04-12 10:11:23 +02:00
|
|
|
import FacilitySearch from "./FacilitySearch";
|
|
|
|
|
import HeroSlider from "./HeroSlider";
|
2026-04-26 11:29:35 +02:00
|
|
|
import type { FacilityRecord } from "@/app/facilityData";
|
|
|
|
|
import { fetchPublicFacilities } from "@/app/publicFacilities";
|
2026-04-12 22:07:51 +02:00
|
|
|
import { createPageMetadata } from "@/app/seo";
|
2026-02-26 09:20:51 +01:00
|
|
|
|
2026-04-26 11:29:35 +02:00
|
|
|
export const revalidate = 900;
|
2026-04-12 10:11:23 +02:00
|
|
|
export const dynamic = "force-dynamic";
|
2026-04-12 22:07:51 +02:00
|
|
|
export const metadata = createPageMetadata({
|
2026-04-13 13:51:11 +02:00
|
|
|
title: "Komplett oversikt over ALLE norske golfbaner",
|
2026-04-12 22:07:51 +02:00
|
|
|
description:
|
2026-04-14 16:31:28 +02:00
|
|
|
"Utforsk norske golfbaner med oppdatert banestatus, kart, priser, medlemskap og Veien til Golf samlet på TeeOff.",
|
2026-04-12 22:07:51 +02:00
|
|
|
path: "/",
|
|
|
|
|
});
|
2026-02-26 09:20:51 +01:00
|
|
|
|
2026-04-17 22:46:57 +02:00
|
|
|
const getHeroRotationSeed = () => new Date().toISOString().slice(0, 13);
|
|
|
|
|
|
2026-02-26 09:20:51 +01:00
|
|
|
export default async function Home() {
|
2026-04-26 11:29:35 +02:00
|
|
|
const safeData = await fetchPublicFacilities<FacilityRecord>("search", revalidate);
|
2026-02-26 09:20:51 +01:00
|
|
|
|
|
|
|
|
return (
|
2026-04-12 10:11:23 +02:00
|
|
|
<main className="site-shell min-h-screen">
|
2026-04-17 22:46:57 +02:00
|
|
|
<HeroSlider facilities={safeData} rotationSeed={getHeroRotationSeed()} />
|
2026-04-12 10:11:23 +02:00
|
|
|
<FacilitySearch initialFacilities={safeData} variant="home" />
|
2026-02-26 09:20:51 +01:00
|
|
|
</main>
|
|
|
|
|
);
|
2026-04-12 10:11:23 +02:00
|
|
|
}
|