import { notFound } from 'next/navigation'; import Header from '@/components/shopify/header'; import Footer from '@/components/shopify/footer'; import { getShopPolicy, POLICY_HANDLES } from '@/hooks/use-shopify-policies'; export function generateStaticParams() { return POLICY_HANDLES.map((handle) => ({ handle })); } export async function generateMetadata({ params, }: { params: Promise<{ handle: string }>; }) { const { handle } = await params; const policy = await getShopPolicy(handle); return { title: policy ? `${policy.title} — Stride` : 'Policy — Stride', }; } export default async function PolicyPage({ params, }: { params: Promise<{ handle: string }>; }) { const { handle } = await params; const policy = await getShopPolicy(handle); if (!policy) { notFound(); } return ( <>

{policy.title}