From 04ba9be6f050cc686133bec57f40da9f8eecb4c8 Mon Sep 17 00:00:00 2001 From: Giovanni-Schroevers Date: Thu, 2 Jul 2026 13:38:34 +0200 Subject: [PATCH] fix(next-ui): don't render disabled pagination items as links Disabled PaginationItems were still given a `component`/`href`, turning them into anchors. Crawlers follow those links to an unbounded number of list pages, needlessly building up the static page cache. Only pass `component`/`href` when the item is enabled; disabled items fall back to a plain button, so bots no longer have a link to crawl. Co-Authored-By: Claude Opus 4.8 --- .changeset/pagination-disabled-no-link.md | 5 +++++ packages/next-ui/Pagination/PaginationExtended.tsx | 3 +-- 2 files changed, 6 insertions(+), 2 deletions(-) create mode 100644 .changeset/pagination-disabled-no-link.md diff --git a/.changeset/pagination-disabled-no-link.md b/.changeset/pagination-disabled-no-link.md new file mode 100644 index 00000000000..b956f0d31b4 --- /dev/null +++ b/.changeset/pagination-disabled-no-link.md @@ -0,0 +1,5 @@ +--- +'@graphcommerce/next-ui': patch +--- + +Only render disabled pagination items as links when enabled. Disabled `PaginationItem`s no longer receive a `component`/`href`, preventing crawlers from following links to an infinite number of list pages and inflating the static page cache. diff --git a/packages/next-ui/Pagination/PaginationExtended.tsx b/packages/next-ui/Pagination/PaginationExtended.tsx index 38076907f71..40ee2638a2a 100644 --- a/packages/next-ui/Pagination/PaginationExtended.tsx +++ b/packages/next-ui/Pagination/PaginationExtended.tsx @@ -84,8 +84,7 @@ export function PaginationExtended(props: PaginationExtendedProps) { renderItem ?? ((item) => (