Skip to content

Commit

Permalink
fix(sidebar-open): fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
MahtabBukhari committed Sep 9, 2024
1 parent f180ec0 commit 5c2f724
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/components/App/MainToolbar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export const MainToolbar = () => {

const { resetAiSummaryAnswer, setNewLoading } = useAiSummaryStore()
const { abortFetchData, resetGraph } = useDataStore((s) => s)
const { setUniverseQuestionIsOpen, setSidebarOpen, setShowCollapseButton, sidebarIsOpen } = useAppStore((s) => s)
const { setUniverseQuestionIsOpen, setSidebarOpen, setShowCollapseButton } = useAppStore((s) => s)
const { customSchemaFeatureFlag, userFeedbackFeatureFlag, chatInterfaceFeatureFlag } = useFeatureFlagStore((s) => s)

const [isAdmin] = useUserStore((s) => [s.isAdmin])
Expand All @@ -45,8 +45,8 @@ export const MainToolbar = () => {

const handleOpenChatModal = () => {
setUniverseQuestionIsOpen()
setSidebarOpen(!sidebarIsOpen)
setShowCollapseButton(!sidebarIsOpen)
setSidebarOpen(true)
setShowCollapseButton(true)
}

return (
Expand Down
2 changes: 1 addition & 1 deletion src/stores/useAppStore/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export const useAppStore = create<AppStore>((set, get) => ({
}),
setSidebarOpen: (sidebarIsOpen) =>
set({
sidebarIsOpen: get().sidebarIsOpen,
sidebarIsOpen,
transcriptIsOpen: !sidebarIsOpen ? false : get().transcriptIsOpen,
}),
setTranscriptOpen: (transcriptIsOpen) => set({ transcriptIsOpen }),
Expand Down

0 comments on commit 5c2f724

Please sign in to comment.