From 4123db21c57b6c5f4327f8b4726843c5c9257e96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89mile=20R=C3=A9?= Date: Fri, 14 Mar 2025 16:54:30 +0400 Subject: [PATCH] Fix put back sidebar trigger --- apps/console/src/components/AppSidebarShell.tsx | 14 ++++++++------ apps/console/src/components/ui/sidebar.tsx | 10 +++++++--- apps/console/src/layouts/ConsoleLayout.tsx | 13 +++++++++---- apps/console/src/pages/FrameworkListPage.tsx | 4 ++-- 4 files changed, 26 insertions(+), 15 deletions(-) diff --git a/apps/console/src/components/AppSidebarShell.tsx b/apps/console/src/components/AppSidebarShell.tsx index a2297b549..a6036363d 100644 --- a/apps/console/src/components/AppSidebarShell.tsx +++ b/apps/console/src/components/AppSidebarShell.tsx @@ -21,12 +21,14 @@ export function AppSidebarShell({ }: AppSidebarShellProps) { return ( - {organizationSwitcher} - - {navMain} - - - {navUser} +
+ {organizationSwitcher} + + {navMain} + + + {navUser} +
); } diff --git a/apps/console/src/components/ui/sidebar.tsx b/apps/console/src/components/ui/sidebar.tsx index 74b229a89..8158e728e 100644 --- a/apps/console/src/components/ui/sidebar.tsx +++ b/apps/console/src/components/ui/sidebar.tsx @@ -1,7 +1,7 @@ import * as React from "react"; import { Slot } from "@radix-ui/react-slot"; import { VariantProps, cva } from "class-variance-authority"; -import { PanelLeft } from "lucide-react"; +import { PanelLeft, PanelLeftClose } from "lucide-react"; import { useIsMobile } from "@/hooks/use-mobile"; import { cn } from "@/lib/utils"; @@ -261,7 +261,7 @@ const SidebarTrigger = React.forwardRef< React.ElementRef, React.ComponentProps >(({ className, onClick, ...props }, ref) => { - const { toggleSidebar } = useSidebar(); + const { toggleSidebar, open } = useSidebar(); return ( ); diff --git a/apps/console/src/layouts/ConsoleLayout.tsx b/apps/console/src/layouts/ConsoleLayout.tsx index 6accb98bf..412113242 100644 --- a/apps/console/src/layouts/ConsoleLayout.tsx +++ b/apps/console/src/layouts/ConsoleLayout.tsx @@ -9,7 +9,11 @@ import { BreadcrumbPage, BreadcrumbSeparator, } from "@/components/ui/breadcrumb"; -import { SidebarInset, SidebarProvider } from "@/components/ui/sidebar"; +import { + SidebarInset, + SidebarProvider, + SidebarTrigger, +} from "@/components/ui/sidebar"; import { Toaster } from "@/components/ui/toaster"; import { graphql, useLazyLoadQuery } from "react-relay"; import { ConsoleLayoutBreadcrumbFrameworkOverviewQuery } from "./__generated__/ConsoleLayoutBreadcrumbFrameworkOverviewQuery.graphql"; @@ -379,10 +383,11 @@ export default function ConsoleLayout() { return ( - + - -
+ + +
@@ -231,7 +231,7 @@ function FrameworkListPageContent({