import { LegalDocPage } from "@/components/legal/LegalDocPage";
import { getLegalDoc } from "@/lib/legal/getLegalDoc";
import type { Metadata } from "next";

export async function generateMetadata(): Promise<Metadata> {
  const doc = getLegalDoc("terms");
  return {
    title: doc?.data.title ?? "Terms of Service",
    description: doc?.data.description,
  };
}

export default function TermsOfServicePage() {
  return <LegalDocPage slug="terms-of-service" />;
}
