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

const pageMetadata: Metadata = {
  title: "Profile",
  description: "A public volunteer or organization profile on Fursa.",
  /* Static for now. `GET /public-profile/{user_id}/` is public, but a
     record-specific title has to respect two rules this review did not want
     to approximate: `is_public`, which should make the page noindex, and
     `show_real_name` / approved-trainer status, which decide whether the
     real name may be shown at all. Recorded as an open item. */
};

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

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