diff --git a/client/web/src/routes/Main/Content/Personal/Sidebar.tsx b/client/web/src/routes/Main/Content/Personal/Sidebar.tsx index c5278cb6a53..25430f7c1ab 100644 --- a/client/web/src/routes/Main/Content/Personal/Sidebar.tsx +++ b/client/web/src/routes/Main/Content/Personal/Sidebar.tsx @@ -40,9 +40,9 @@ SidebarSection.displayName = 'SidebarSection'; export const PersonalSidebar: React.FC = React.memo(() => { const converseList = useDMConverseList(); const userInfo = useUserInfo(); - const { disablePluginStore } = useGlobalConfigStore((state) => ({ - disablePluginStore: state.disablePluginStore, - })); + const disablePluginStore = useGlobalConfigStore( + (state) => state.disablePluginStore + ); const hasFriendRequest = useAppSelector( (state) => state.user.friendRequests.findIndex( diff --git a/client/web/src/routes/Main/Content/Personal/index.tsx b/client/web/src/routes/Main/Content/Personal/index.tsx index ba42ea3fd52..872e45e5ce5 100644 --- a/client/web/src/routes/Main/Content/Personal/index.tsx +++ b/client/web/src/routes/Main/Content/Personal/index.tsx @@ -9,12 +9,16 @@ import { PersonalConverse } from './Converse'; import { FriendPanel } from './Friends'; import { PluginsPanel } from './Plugins'; import { PersonalSidebar } from './Sidebar'; +import { useGlobalConfigStore } from 'tailchat-shared'; export const Personal: React.FC = React.memo(() => { const [lastVisitPanelUrl, setLastVisitPanelUrl] = useUserSessionPreference( 'personLastVisitPanelUrl' ); const location = useLocation(); + const disablePluginStore = useGlobalConfigStore( + (state) => state.disablePluginStore + ); useEffect(() => { setLastVisitPanelUrl(location.pathname); @@ -24,7 +28,9 @@ export const Personal: React.FC = React.memo(() => { }> } /> - } /> + {!disablePluginStore && ( + } /> + )} } /> {pluginCustomPanel .filter((p) => p.position === 'personal')