import { localizedMetadata } from "@/lib/i18n/serverMetadata";
import type { Metadata } from "next";
import CommunityDetailPage from "@/features/community/components/CommunityDetailPage";

const pageMetadata: Metadata = {
  title: "Community post",
  description: "A post shared with the Fursa community, and its replies.",
  /* Static rather than record-specific: `GET /posts/{id}/` is public, but a
     post has body text and no title field, so a useful per-record title
     would mean clipping user-written content into the tab. Left as an open
     item in the review checklist. */
};

export async function generateMetadata(): Promise<Metadata> {
  return localizedMetadata(pageMetadata);
}

export default async function Page({
  params,
}: {
  params: Promise<{ id: string }>;
}) {
  const { id } = await params;
  return <CommunityDetailPage id={id} />;
}
