diff --git a/web/containers/Layout/TopBar/index.tsx b/web/containers/Layout/TopBar/index.tsx index 9ef03dd11..af310a60d 100644 --- a/web/containers/Layout/TopBar/index.tsx +++ b/web/containers/Layout/TopBar/index.tsx @@ -1,20 +1,22 @@ import { useState } from 'react' import { getUserSpace, joinPath, openFileExplorer } from '@janhq/core' -import { useAtomValue, useSetAtom } from 'jotai' +import { useAtom, useAtomValue } from 'jotai' import { - PanelLeftIcon, PenSquareIcon, - PanelRightIcon, MoreVerticalIcon, FolderOpenIcon, Code2Icon, + PanelLeftCloseIcon, + PanelRightCloseIcon, } from 'lucide-react' import { twMerge } from 'tailwind-merge' import CommandSearch from '@/containers/Layout/TopBar/CommandSearch' +import { showLeftSideBarAtom } from '@/containers/Providers/KeyListener' + import { MainViewState } from '@/constants/screens' import { useClickOutside } from '@/hooks/useClickOutside' @@ -31,7 +33,8 @@ const TopBar = () => { const { mainViewState } = useMainViewState() const { requestCreateNewThread } = useCreateNewThread() const { assistants } = useGetAssistants() - const setShowRightSideBar = useSetAtom(showRightSideBarAtom) + const [showRightSideBar, setShowRightSideBar] = useAtom(showRightSideBarAtom) + const [showLeftSideBar, setShowLeftSideBar] = useAtom(showLeftSideBarAtom) const showing = useAtomValue(showRightSideBarAtom) const threadStates = useAtomValue(threadStatesAtom) const [more, setMore] = useState(false) @@ -105,10 +108,16 @@ const TopBar = () => {
Toogle collapsible left panel
+Navigate to setting page
+