"use client";

/**
 * Catch-all route that mounts the embedded Sanity Studio. The Studio is
 * a client-only single-page app — we force static generation at the
 * route shell level so Next doesn't try to RSC-render the guts. All
 * routing under /studio is handled client-side by the Studio itself.
 *
 * Note: metadata + viewport cannot live in a "use client" file, so they
 * are re-exported from the neighbouring server `layout.tsx`.
 */

import { NextStudio } from "next-sanity/studio";

import config from "../../../../sanity.config";

export const dynamic = "force-static";

export default function StudioPage() {
  return <NextStudio config={config} />;
}
