diff --git a/components/context/PlaygroundContext.tsx b/components/context/PlaygroundContext.tsx index f2753d8555..b7f5245cfd 100644 --- a/components/context/PlaygroundContext.tsx +++ b/components/context/PlaygroundContext.tsx @@ -59,7 +59,8 @@ export const PlaygroundContextProvider = (props: { children: React.ReactNode }) const router = useRouter() const [activeSectionIndex, setActiveSectionIndex] = useState(0) const [scrollToSection, setScrollToSection] = useState() - const path = router.asPath.split('?')[0] + const path = router.asPath.split('?')[0].split('#')[0] + const relevantArticles = articles.filter(({ slug }) => slug === path) const { langId } = router.query diff --git a/components/playground/CodeLanguagePicker.tsx b/components/playground/CodeLanguagePicker.tsx index 6cef145135..f7df48ed4c 100644 --- a/components/playground/CodeLanguagePicker.tsx +++ b/components/playground/CodeLanguagePicker.tsx @@ -13,6 +13,7 @@ export const CodeLanguagePicker = () => { {codeLanguages.map((language) => ( = ({ article }) => { {editorFiles.map((file, i) => { return (