layout.tsx 584 B

1234567891011121314151617
  1. import type { Metadata } from "next";
  2. import { siteConfig } from "@/config/site";
  3. // Resolves the root opengraph-image for pages outside [lang] (the bare 404).
  4. export const metadata: Metadata = { metadataBase: new URL(siteConfig.url) };
  5. // The real root layout is app/[lang]/layout.tsx, which renders <html> in the
  6. // page's language. This pass-through gives Next a fixed root above it, so a
  7. // notFound() anywhere under [lang] renders [lang]/not-found.tsx in its layout.
  8. export default function RootLayout({
  9. children,
  10. }: {
  11. children: React.ReactNode;
  12. }) {
  13. return children;
  14. }