mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-23 16:11:12 -05:00
Refactor: Hide sidebar when collapsed
This commit is contained in:
@@ -220,25 +220,9 @@ export default function Designers() {
|
||||
{/* 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>
|
||||
@@ -255,9 +239,9 @@ export default function Designers() {
|
||||
<DesignerFilters filters={filters} onFiltersChange={setFilters} designers={companies} />
|
||||
</CardContent>
|
||||
</Card>
|
||||
)}
|
||||
</div>
|
||||
</aside>
|
||||
</div>
|
||||
</aside>
|
||||
)}
|
||||
|
||||
{/* Results Area */}
|
||||
<div className="flex-1 min-w-0">
|
||||
|
||||
Reference in New Issue
Block a user