From 7e0e3e894c080c8fe9e2f93d0e3ce511d7673d97 Mon Sep 17 00:00:00 2001 From: vanyauhalin Date: Fri, 12 Jul 2024 16:23:55 +0400 Subject: [PATCH] change the default depth of the table of contents --- site/internal/table-of-contents.tsx | 2 +- site/layouts/service-declaration.tsx | 2 +- site/pages/Sitemap/index.tsx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/site/internal/table-of-contents.tsx b/site/internal/table-of-contents.tsx index 61989ddf5..f944b9654 100644 --- a/site/internal/table-of-contents.tsx +++ b/site/internal/table-of-contents.tsx @@ -9,7 +9,7 @@ export interface TableOfContentsProperties { export function TableOfContents(p: TableOfContentsProperties): JSX.Element { const s = Sitemap.shared - const {depth = 1} = p + const {depth = -1} = p const e = s.find(p.url, "url") if (!e) { return <> diff --git a/site/layouts/service-declaration.tsx b/site/layouts/service-declaration.tsx index 20ff256e2..8b45d4a40 100644 --- a/site/layouts/service-declaration.tsx +++ b/site/layouts/service-declaration.tsx @@ -17,7 +17,7 @@ export function render(ctx: Context): JSX.Element { switch (d.kind) { case "group": // todo: move to the ServiceDeclaration - return + return case "request": return - + }