Refactor: Hide sidebar when collapsed

This commit is contained in:
gpt-engineer-app[bot]
2025-10-28 15:59:14 +00:00
parent 575ccd013b
commit ba1c0625b0
5 changed files with 30 additions and 110 deletions

View File

@@ -291,25 +291,9 @@ const Operators = () => {
{/* Main Content Area with Sidebar */}
<div className="flex flex-col lg:flex-row gap-6">
{/* Desktop Filter Sidebar */}
<aside
className={cn(
"hidden lg:block flex-shrink-0 transition-all duration-300",
sidebarCollapsed
? "lg:w-[60px]"
: "lg:w-[340px] xl:w-[380px] 2xl:w-[420px]"
)}
>
<div className="sticky top-24">
{sidebarCollapsed ? (
<Button
variant="ghost"
className="w-full"
onClick={() => setSidebarCollapsed(false)}
title="Show filters"
>
<PanelLeftOpen className="w-5 h-5" />
</Button>
) : (
{!sidebarCollapsed && (
<aside className="hidden lg:block flex-shrink-0 transition-all duration-300 lg:w-[340px] xl:w-[380px] 2xl:w-[420px]">
<div className="sticky top-24">
<Card>
<CardHeader className="flex flex-row items-center justify-between pb-2">
<CardTitle className="text-base">Filters</CardTitle>
@@ -326,9 +310,9 @@ const Operators = () => {
<OperatorFilters filters={filters} onFiltersChange={setFilters} operators={operators || []} />
</CardContent>
</Card>
)}
</div>
</aside>
</div>
</aside>
)}
{/* Results Area */}
<div className="flex-1 min-w-0">