diff --git a/ui/app/src/Sidebar/Sidebar.tsx b/ui/app/src/Sidebar/Sidebar.tsx index 5a40181e8..32cf1decf 100644 --- a/ui/app/src/Sidebar/Sidebar.tsx +++ b/ui/app/src/Sidebar/Sidebar.tsx @@ -6,7 +6,6 @@ import { useStore, useCurrentDocument, useDocByType, - useConfig, useActiveTab, useCurrentStory, } from '@component-controls/store'; @@ -171,10 +170,10 @@ export const Sidebar: FC = ({ const { title: docId } = useCurrentDocument() || {}; const story = useCurrentStory(); const activeId = story ? story.id : docId; - const config = useConfig() || {}; const docs: Pages = useDocByType(type); const [search, setSearch] = useState(undefined); const node = useMemo(() => { + const { config } = store; const { pages, menu, sidebar = [] } = config; const page: PageConfiguration = pages?.[type] || {}; const { label = '' } = page; @@ -252,16 +251,6 @@ export const Sidebar: FC = ({ ); - }, [ - activeId, - activeTab, - config, - docs, - propsTitle, - responsive, - search, - store, - type, - ]); + }, [activeId, activeTab, docs, propsTitle, responsive, search, store, type]); return node; };