import { Metadata, ResolvingMetadata } from "next";
import {
  SponsorsPageView,
  loadSponsorsPageProps,
} from "@/components/sponsor/SponsorsPageView";
import { getSeoMetadata } from "@/lib/seo";

export async function generateMetadata(
  _: unknown,
  parent: ResolvingMetadata
): Promise<Metadata | null> {
  const { page } = await loadSponsorsPageProps();
  return getSeoMetadata(page, parent);
}

export default async function Page() {
  const props = await loadSponsorsPageProps();
  return <SponsorsPageView {...props} />;
}
