diff --git a/src/components/layout/sidebar.tsx b/src/components/layout/sidebar.tsx index af31e79a..cdcd0786 100644 --- a/src/components/layout/sidebar.tsx +++ b/src/components/layout/sidebar.tsx @@ -7,7 +7,7 @@ import { SidebarHeader, SidebarMenu, SidebarMenuButton, - SidebarMenuItem, + SidebarMenuItem, useSidebar, } from "@/components/ui/sidebar" import { t } from 'i18next'; import { cn } from '@root/lib/utils'; @@ -23,6 +23,7 @@ import { } from 'lucide-react'; import { UpdateButton } from "@/components/layout/update-button"; import React from "react"; +import { SheetClose } from '@/components/ui/sheet'; const menuItems = [ { title: 'Home', url: '/home', icon: Home }, @@ -35,6 +36,7 @@ const menuItems = [ ]; export function AppSidebar() { + const { isMobile } = useSidebar(); return ( @@ -51,13 +53,8 @@ export function AppSidebar() { {menuItems.map((item) => { const isActive = location.pathname === item.url; - return ( - - - {t(item.title)} + ) + return ( + + + {isMobile ? ( + + {linkElement} + + ) : ( + linkElement + )} )