From 070aea3c51714c6a0e967949d51f9cec782a15a5 Mon Sep 17 00:00:00 2001 From: Mohammed Abad Date: Mon, 25 May 2026 04:30:45 +0100 Subject: [PATCH] fix(layout): adjust sidebar and main layout for improved responsiveness --- .../src/components/layout/AppLayout.tsx | 2 +- .../src/components/layout/Sidebar.tsx | 91 +++++++------------ 2 files changed, 33 insertions(+), 60 deletions(-) diff --git a/react_frontend/src/components/layout/AppLayout.tsx b/react_frontend/src/components/layout/AppLayout.tsx index 32e79e0..378a870 100644 --- a/react_frontend/src/components/layout/AppLayout.tsx +++ b/react_frontend/src/components/layout/AppLayout.tsx @@ -79,7 +79,7 @@ export function AppLayout() { -
+
diff --git a/react_frontend/src/components/layout/Sidebar.tsx b/react_frontend/src/components/layout/Sidebar.tsx index 7c6df9c..656b536 100644 --- a/react_frontend/src/components/layout/Sidebar.tsx +++ b/react_frontend/src/components/layout/Sidebar.tsx @@ -1,4 +1,4 @@ -import { NavLink } from 'react-router-dom'; +import { NavLink } from 'react-router-dom'; import { LayoutDashboard, Home, @@ -12,21 +12,13 @@ import { Moon, Sun, Film, - // Search, } from 'lucide-react'; import { useThemeStore } from '@/stores/useThemeStore'; -import { Button } from '@/components/ui/button'; import { Separator } from '@/components/ui/separator'; -import { - Tooltip, - TooltipContent, - TooltipTrigger, -} from '@/components/ui/tooltip'; const mainNav = [ { to: '/dashboard', icon: LayoutDashboard, label: 'Dashboard' }, { to: '/', icon: Home, label: 'Home' }, - // { to: '/search', icon: Search, label: 'Search' }, ]; const libraryNav = [ @@ -51,25 +43,20 @@ function NavItem({ label: string; }) { return ( - - - - `flex items-center gap-3 rounded-lg px-3 py-2 text-sm transition-colors ${ - isActive - ? 'bg-sidebar-accent text-sidebar-primary font-medium' - : 'text-sidebar-foreground/70 hover:bg-sidebar-accent/50 hover:text-sidebar-foreground' - }` - } - > - - {label} - - - {label} - + + `relative flex flex-col items-center gap-1 rounded-md px-2 py-2.5 transition-colors ${ + isActive + ? 'bg-sidebar-accent text-sidebar-primary' + : 'text-sidebar-foreground/50 hover:bg-sidebar-accent/40 hover:text-sidebar-foreground' + }` + } + > + + {label} + ); } @@ -77,60 +64,48 @@ export function Sidebar() { const { theme, toggleTheme } = useThemeStore(); return ( -