Skip to content

Commit 944dea0

Browse files
authored
Add NPM stats page for each library (#657)
* Add NPM stats page for each library * break out original components a little more * remove link for full-stats * better way to display competitors
1 parent 21c1b8f commit 944dea0

20 files changed

+3052
-1646
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,4 @@ dist
2929
.content-collections
3030

3131
test-results
32+
.claude/CLAUDE.md

src/components/DocsLayout.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -378,6 +378,10 @@ const useMenuConfig = ({
378378
label: 'Contributors',
379379
to: '/$libraryId/$version/docs/contributors',
380380
},
381+
{
382+
label: 'NPM Stats',
383+
to: '/$libraryId/$version/docs/npm-stats',
384+
},
381385
...(config.sections.find((d) => d.label === 'Community Resources')
382386
? [
383387
{
@@ -471,6 +475,8 @@ export function DocsLayout({
471475

472476
const isExample = matches.some((d) => d.pathname.includes('/examples/'))
473477

478+
const isNpmStats = matches.some((d) => d.pathname.includes('/docs/npm-stats'))
479+
474480
const detailsRef = React.useRef<HTMLElement>(null!)
475481

476482
const flatMenu = React.useMemo(
@@ -750,6 +756,7 @@ export function DocsLayout({
750756
!isLandingPage && 'min-h-[88dvh] sm:min-h-0',
751757
!isLandingPage &&
752758
!isExample &&
759+
!isNpmStats &&
753760
!isFullWidth &&
754761
'mx-auto w-[900px]',
755762
)}

src/components/NpmStatsChart.tsx

Lines changed: 0 additions & 91 deletions
This file was deleted.

0 commit comments

Comments
 (0)