diff --git a/src/pages/docs/api-reference/[slug].tsx b/src/pages/docs/api-reference/[slug].tsx index 8f49ba6d2..671652b85 100644 --- a/src/pages/docs/api-reference/[slug].tsx +++ b/src/pages/docs/api-reference/[slug].tsx @@ -121,6 +121,19 @@ const APIPage: NextPage = ({ } }, []) + useEffect(() => { + const handleHashChange = () => { + const newHash = window.location.hash.substring(1) + router.push(`${window.location.pathname}?endpoint=${newHash}`) + } + + window.addEventListener('hashchange', handleHashChange) + + return () => { + window.removeEventListener('hashchange', handleHashChange) + } + }, [router]) + useEffect(() => { setEndpointPagination( pagination[endpointPath] ? pagination[endpointPath] : pag