// page.tsx import { API_URL } from "@/config/constants"; import FacilityDetailView from "./FacilityDetailView"; export default async function GolfCoursePage({ params }: { params: Promise<{ slug: string }> }) { const { slug } = await params; const res = await fetch(`${API_URL}/facilities/${slug}`, { cache: 'no-store' }); const facility = await res.json(); if (!facility || facility.error) { return
Fant ikke golfbanen...
; } // Vi sender dataene til den navngitte komponenten return ; }