diff --git a/src/components/App/index.tsx b/src/components/App/index.tsx index bf355b12b..c8de1568c 100644 --- a/src/components/App/index.tsx +++ b/src/components/App/index.tsx @@ -322,10 +322,10 @@ export const App = () => { }, [runningProjectId, setRunningProjectMessages]) useEffect(() => { - if (!splashDataLoading) { + if (chatInterfaceFeatureFlag && !splashDataLoading) { setUniverseQuestionIsOpen() } - }, [setUniverseQuestionIsOpen, splashDataLoading]) + }, [setUniverseQuestionIsOpen, splashDataLoading, chatInterfaceFeatureFlag]) return ( <> @@ -340,7 +340,7 @@ export const App = () => { - {!universeQuestionIsOpen && } + {!universeQuestionIsOpen && chatInterfaceFeatureFlag && } diff --git a/src/stores/useAppStore/index.ts b/src/stores/useAppStore/index.ts index 370a08756..7a68b8e15 100644 --- a/src/stores/useAppStore/index.ts +++ b/src/stores/useAppStore/index.ts @@ -1,6 +1,5 @@ import { create } from 'zustand' import { TAboutParams } from '~/network/fetchSourcesData' -import { useFeatureFlagStore } from '~/stores/useFeatureFlagStore' export type SecondarySidebarActiveTab = '' | 'sentiment' | 'sources' | 'about' @@ -72,11 +71,7 @@ export const useAppStore = create((set, get) => ({ transcriptIsOpen: !sidebarIsOpen ? false : get().transcriptIsOpen, }), setTranscriptOpen: (transcriptIsOpen) => set({ transcriptIsOpen }), - setUniverseQuestionIsOpen: () => { - const { chatInterfaceFeatureFlag } = useFeatureFlagStore.getState() - - set({ universeQuestionIsOpen: chatInterfaceFeatureFlag ? !get().universeQuestionIsOpen : false }) - }, + setUniverseQuestionIsOpen: () => set({ universeQuestionIsOpen: !get().universeQuestionIsOpen }), setAppMetaData: (appMetaData) => set({ appMetaData }), setShowCollapseButton: (showCollapseButton) => set({ showCollapseButton }), setSelectedColor: (selectedColor) => set({ selectedColor }),