From c9809c4e8b2801dd010842943b45e0023e505cfb Mon Sep 17 00:00:00 2001 From: Jonathan Summers-Muir Date: Tue, 20 Dec 2022 16:38:55 +0800 Subject: [PATCH] Update NavigationMenuRefListItems.tsx --- .../NavigationMenu/NavigationMenuRefListItems.tsx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/apps/docs/components/Navigation/NavigationMenu/NavigationMenuRefListItems.tsx b/apps/docs/components/Navigation/NavigationMenu/NavigationMenuRefListItems.tsx index e7a92db08a8..148ebfe3372 100644 --- a/apps/docs/components/Navigation/NavigationMenu/NavigationMenuRefListItems.tsx +++ b/apps/docs/components/Navigation/NavigationMenu/NavigationMenuRefListItems.tsx @@ -9,7 +9,7 @@ import Image from 'next/image' import { useTheme } from 'common/Providers' import RevVersionDropdown from '~/components/RefVersionDropdown' -// import { useMenuActiveRefId } from '~/hooks/useMenuState' +import { useMenuActiveRefId } from '~/hooks/useMenuState' import { RefIdOptions, RefKeyOptions } from './NavigationMenu' import React from 'react' @@ -39,7 +39,7 @@ const HeaderLink = React.memo(function HeaderLink(props: any) { ) }) -const FunctionLink = ({ +const FunctionLink = React.memo(function FunctionLink({ title, id, icon, @@ -53,9 +53,9 @@ const FunctionLink = ({ product?: string library: string slug: string -}) => { +}) { const router = useRouter() - const activeAccordianItem = '1' // useMenuActiveRefId() + const activeAccordianItem = useMenuActiveRefId() // check if we're on a versioned page let version = '' @@ -83,7 +83,7 @@ const FunctionLink = ({ ) -} +}) const SideMenuTitle = ({ title }: { title: string }) => { return (