diff --git a/front/components/assistant/conversation/ConversationLayout.tsx b/front/components/assistant/conversation/ConversationLayout.tsx index ba3b22f7c54e..d315cfe9a8d9 100644 --- a/front/components/assistant/conversation/ConversationLayout.tsx +++ b/front/components/assistant/conversation/ConversationLayout.tsx @@ -79,7 +79,6 @@ export default function ConversationLayout({ -
+
+
void; +}) { + const buttonRef = useRef(null); + const [direction, setDirection] = useState<"left" | "right">("left"); + + const handleClick = useCallback(() => { + toggleNavigationBarVisibility(!isNavigationBarOpened); + setDirection((prevDirection) => + prevDirection === "left" ? "right" : "left" + ); + }, [isNavigationBarOpened, toggleNavigationBarVisibility]); + + return ( +
+ +
+ ); +} + function NavigationBar({ owner, subscription, @@ -191,7 +236,6 @@ export const appLayoutBack = async ( export default function AppLayout({ owner, subscription, - isWideMode = false, hideSidebar = false, topNavigationCurrent, subNavigation, @@ -214,6 +258,7 @@ export default function AppLayout({ children: React.ReactNode; }) { const { sidebarOpen, setSidebarOpen } = useContext(SidebarContext); + const [isNavigationBarOpened, setNavigationBarOpened] = useState(true); const [loaded, setLoaded] = useState(false); const router = useRouter(); const user = useUser(); @@ -355,7 +400,7 @@ export default function AppLayout({ )} - {!hideSidebar && ( + {!hideSidebar && isNavigationBarOpened && (
{loaded && (
@@ -417,16 +463,18 @@ export default function AppLayout({ titleChildren ? "" : "lg:pt-8" )} > -
- {loaded && children} -
+
{loaded && children}
+ +
+ + setNavigationBarOpened(isVisible) + } + /> +
<>