diff --git a/components/sidebar/RestCollapsibleSection.tsx b/components/sidebar/RestCollapsibleSection.tsx index 7fd832cc326b..f807d38e664f 100644 --- a/components/sidebar/RestCollapsibleSection.tsx +++ b/components/sidebar/RestCollapsibleSection.tsx @@ -65,31 +65,33 @@ export const RestCollapsibleSection = (props: SectionProps) => { }, []) useEffect(() => { - const observer = new IntersectionObserver( - (entries) => { - entries.forEach((entry) => { - if (entry.target.id) { - const anchor = '#' + entry.target.id.split('--')[0] - if (entry.isIntersecting === true) setVisibleAnchor(anchor) - } else if (router.asPath.includes('#')) { - setVisibleAnchor('#' + router.asPath.split('#')[1]) - } else { - setVisibleAnchor('') - } - }) - }, - { rootMargin: '0px 0px -85% 0px' } - ) - // TODO: When we add the ## About the {title} API to each operation - // we can remove the h2 here - const headingsList = Array.from(document.querySelectorAll('h2, h3')) - - headingsList.forEach((heading) => { - observer.observe(heading) - }) - - return () => { - observer.disconnect() + if (!router.asPath.includes('guides') && !router.asPath.includes('overview')) { + const observer = new IntersectionObserver( + (entries) => { + entries.forEach((entry) => { + if (entry.target.id) { + const anchor = '#' + entry.target.id.split('--')[0] + if (entry.isIntersecting === true) setVisibleAnchor(anchor) + } else if (router.asPath.includes('#')) { + setVisibleAnchor('#' + router.asPath.split('#')[1]) + } else { + setVisibleAnchor('') + } + }) + }, + { rootMargin: '0px 0px -85% 0px' } + ) + // TODO: When we add the ## About the {title} API to each operation + // we can remove the h2 here + const headingsList = Array.from(document.querySelectorAll('h2, h3')) + + headingsList.forEach((heading) => { + observer.observe(heading) + }) + + return () => { + observer.disconnect() + } } }, [miniTocItems]) // This wrapper solves the issue of having standalone categories not diff --git a/pages/[versionId]/rest/overview/endpoints-available-for-github-apps.tsx b/pages/[versionId]/rest/overview/endpoints-available-for-github-apps.tsx index 26173afc8b5f..4484318864cf 100644 --- a/pages/[versionId]/rest/overview/endpoints-available-for-github-apps.tsx +++ b/pages/[versionId]/rest/overview/endpoints-available-for-github-apps.tsx @@ -44,8 +44,8 @@ export default function Category({ mainContext, enabledForApps, articleContext } )}
{operation.verb} {operation.requestPath}