Skip to content

An open source design system that's fully customizable and agent ready

TypeScript

fix(docsite): emit copyright header in generated registries + fix DocsShell prop names (#2219)

Gerard Rovira51d7a87093ff
diff --git a/apps/docsite/scripts/generate-data.mjs b/apps/docsite/scripts/generate-data.mjs
index 2cd3c2f9d7..2e9519e580 100644
--- a/apps/docsite/scripts/generate-data.mjs
+++ b/apps/docsite/scripts/generate-data.mjs
@@ -33,9 +33,12 @@ fs.mkdirSync(OUT_DIR, {recursive: true});
// ── Helpers ────────────────────────────────────────────────────────────
+const COPYRIGHT_HEADER =
+ '// Copyright (c) Meta Platforms, Inc. and affiliates.\n\n';
+
function writeRegistry(filename, content) {
const outPath = path.join(OUT_DIR, filename);
- fs.writeFileSync(outPath, content, 'utf-8');
+ fs.writeFileSync(outPath, COPYRIGHT_HEADER + content, 'utf-8');
console.log(` wrote ${path.relative(REPO_ROOT, outPath)}`);
}
diff --git a/apps/docsite/src/components/DocsShell.tsx b/apps/docsite/src/components/DocsShell.tsx
index 66f77e1380..3f44878b52 100644
--- a/apps/docsite/src/components/DocsShell.tsx
+++ b/apps/docsite/src/components/DocsShell.tsx
@@ -48,10 +48,10 @@ function buildComponentSidebar(): {
export function DocsShell({
children,
- _components,
+ components: _components,
packages,
docTopics,
- _templates,
+ templates: _templates,
defaultIsMobile,
}: DocsShellProps) {
const pathname = usePathname();