From a47b0f3eb6fb53685b56aa987a2fa2b76a11c1a0 Mon Sep 17 00:00:00 2001 From: Seung Park Date: Tue, 21 Feb 2023 12:59:36 -0500 Subject: [PATCH] DOP-3515 (#773) use title from toc root node --- src/components/Sidenav/Sidenav.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/Sidenav/Sidenav.js b/src/components/Sidenav/Sidenav.js index dbae882d1..d58b4624a 100644 --- a/src/components/Sidenav/Sidenav.js +++ b/src/components/Sidenav/Sidenav.js @@ -217,7 +217,9 @@ const Sidenav = ({ chapters, guides, page, pageTitle, repoBranches, siteTitle, s return hideMobileSidenav()} slug={slug} toctree={toctree} />; }, [chapters, guides, hideMobileSidenav, isGuidesLanding, isGuidesTemplate, page, slug, toctree, activeToc]); - const navTitle = isGuidesTemplate ? guides?.[slug]?.['chapter_name'] : siteTitle; + const navTitle = isGuidesTemplate + ? guides?.[slug]?.['chapter_name'] + : formatText(process.env.GATSBY_TEST_EMBED_VERSIONS === 'true' ? activeToc.title : toctree.title); const guidesChapterNumber = useMemo(() => { if (!isGuidesTemplate) {