import { notFound } from 'next/navigation';
import { getLegacyPage } from '../../../lib/legacy-pages.server';
import { LegacyPageView, legacyMetadata } from '../../../components/legacy-page';
type Props = { params: Promise<{ legacy: string[] }> };
export async function generateMetadata({ params }: Props) {
  const page = getLegacyPage('/produtos/' + (await params).legacy.join('/'));
  return page ? legacyMetadata(page) : {};
}
export default async function Page({ params }: Props) {
  const page = getLegacyPage('/produtos/' + (await params).legacy.join('/'));
  if (!page) notFound();
  return <LegacyPageView page={page} />;
}
