Functiondiscord-component-embed/reactv1.1.1
ComponentEmbed(
{ children },
input: ComponentEmbedProps
): ReactElement// app/[...slug]/page.tsx in Next.js
export default async function GuidePage({ params }: PageProps<'/[...slug]'>) {
const page = await getGuidePage((await params).slug);
// only Discord's crawler reads the <ComponentEmbed> tag
return (
<>
<ComponentEmbed>
<GuidePreview page={page} />
</ComponentEmbed>
<article>{page.body}</article>
</>
);
}{ children }
{ children }input
input: ComponentEmbedProps