From be3f68ed0653458e6f0fc5b1b01e42b172588e55 Mon Sep 17 00:00:00 2001 From: Felix Roos Date: Mon, 13 Feb 2023 00:42:16 +0100 Subject: [PATCH] fix comment --- website/src/components/RightSidebar/RightSidebar.astro | 1 + website/src/components/RightSidebar/TableOfContents.tsx | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/website/src/components/RightSidebar/RightSidebar.astro b/website/src/components/RightSidebar/RightSidebar.astro index 17ef167b..e6031e4d 100644 --- a/website/src/components/RightSidebar/RightSidebar.astro +++ b/website/src/components/RightSidebar/RightSidebar.astro @@ -10,6 +10,7 @@ type Props = { const { headings, githubEditUrl } = Astro.props as Props; let currentPage = Astro.url.pathname; +// remove slash before # currentPage = currentPage.endsWith('/') ? currentPage.slice(0, -1) : currentPage; --- diff --git a/website/src/components/RightSidebar/TableOfContents.tsx b/website/src/components/RightSidebar/TableOfContents.tsx index 878a933a..99c0eb54 100644 --- a/website/src/components/RightSidebar/TableOfContents.tsx +++ b/website/src/components/RightSidebar/TableOfContents.tsx @@ -12,7 +12,6 @@ const TableOfContents: FunctionalComponent<{ headings: MarkdownHeading[]; curren headings = [], currentPage, }) => { - // remove slash before # const toc = useRef(); const onThisPageID = 'on-this-page-heading'; const itemOffsets = useRef([]);