diff --git a/docs/src/app/new/(content)/layout.tsx b/docs/src/app/new/(content)/layout.tsx index d4396436eb..cd7084c8ab 100644 --- a/docs/src/app/new/(content)/layout.tsx +++ b/docs/src/app/new/(content)/layout.tsx @@ -1,4 +1,5 @@ import * as React from 'react'; +import type { Metadata } from 'next/types'; import * as SideNav from 'docs/src/components/SideNav'; import * as QuickNav from 'docs/src/components/quick-nav/QuickNav'; import './layout.css'; @@ -161,3 +162,8 @@ const nav = [ ], }, ]; +// Title and description are pulled from
{children}
;
}
-
-function getTextContents(node?: React.ReactNode): string {
- if (hasChildren(node)) {
- return getTextContents(node.props?.children);
- }
-
- if (Array.isArray(node)) {
- return node.map(getTextContents).flat().filter(Boolean).join('');
- }
-
- if (typeof node === 'string') {
- return node;
- }
-
- return '';
-}
-
-function hasChildren(
- element?: React.ReactNode,
-): element is React.ReactElement
,
- h1: (props) => ,
+ h1: (props) => (
+