From 7047618e00a2f5b380e4895fee6e77cc99f0c0eb Mon Sep 17 00:00:00 2001 From: Maxwell <145994855+ping-maxwell@users.noreply.github.com> Date: Mon, 2 Mar 2026 11:48:34 -0800 Subject: [PATCH] docs: remove unnecessary `hasSubpages` sidebar prop (#8296) --- landing/components/docs/docs-sidebar.tsx | 7 +++++-- landing/components/sidebar-content.tsx | 2 -- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/landing/components/docs/docs-sidebar.tsx b/landing/components/docs/docs-sidebar.tsx index 637d8f75ba..96a645ec6d 100644 --- a/landing/components/docs/docs-sidebar.tsx +++ b/landing/components/docs/docs-sidebar.tsx @@ -29,7 +29,9 @@ export function DocsSidebar() { item.list.some( (listItem) => listItem.href === pathname || - (listItem.hasSubpages && pathname.startsWith(`${listItem.href}/`)) || + (listItem.subpages && + listItem.subpages.length > 0 && + pathname.startsWith(`${listItem.href}/`)) || listItem.subpages?.some((sp) => sp.href && pathname === sp.href), ), ); @@ -316,7 +318,8 @@ function SidebarSection({ const active = pathname === item.href || subpageMatch || - (!!item.hasSubpages && pathname.startsWith(`${item.href}/`)); + (!!(item.subpages && item.subpages.length > 0) && + pathname.startsWith(`${item.href}/`)); return ( , - hasSubpages: true, subpages: [ { title: "invalid_callback_request",