mirror of
https://github.com/better-auth/better-auth.git
synced 2026-05-23 23:52:05 -05:00
docs: remove unnecessary hasSubpages sidebar prop (#8296)
This commit is contained in:
@@ -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 (
|
||||
<SidebarItemWithSubpages
|
||||
|
||||
@@ -41,7 +41,6 @@ export interface ListItem {
|
||||
group?: boolean;
|
||||
separator?: boolean;
|
||||
isNew?: boolean;
|
||||
hasSubpages?: boolean;
|
||||
subpages?: SubpageItem[];
|
||||
}
|
||||
|
||||
@@ -2680,7 +2679,6 @@ C0.7,239.6,62.1,0.5,62.2,0.4c0,0,54,13.8,119.9,30.8S302.1,62,302.2,62c0.2,0,0.2,
|
||||
title: "Errors",
|
||||
href: "/docs/reference/errors",
|
||||
icon: () => <TriangleAlertIcon className="w-4 h-4 text-current" />,
|
||||
hasSubpages: true,
|
||||
subpages: [
|
||||
{
|
||||
title: "invalid_callback_request",
|
||||
|
||||
Reference in New Issue
Block a user