import { Metadata, ResolvingMetadata } from "next";
import {
  StudioPageView,
  loadStudioPageProps,
} from "@/components/studio/StudioPageView";
import { getSeoMetadata } from "@/lib/seo";

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

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