mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-22 23:31:12 -05:00
Refactor: Simplify collapsed sidebar UI
This commit is contained in:
@@ -229,18 +229,16 @@ export default function Designers() {
|
||||
)}
|
||||
>
|
||||
<div className="sticky top-24">
|
||||
{sidebarCollapsed ? (
|
||||
<Card className="p-2">
|
||||
<Button
|
||||
variant="ghost"
|
||||
className="w-full"
|
||||
onClick={() => setSidebarCollapsed(false)}
|
||||
title="Show filters"
|
||||
>
|
||||
<PanelLeftOpen className="w-5 h-5" />
|
||||
</Button>
|
||||
</Card>
|
||||
) : (
|
||||
{sidebarCollapsed ? (
|
||||
<Button
|
||||
variant="ghost"
|
||||
className="w-full"
|
||||
onClick={() => setSidebarCollapsed(false)}
|
||||
title="Show filters"
|
||||
>
|
||||
<PanelLeftOpen className="w-5 h-5" />
|
||||
</Button>
|
||||
) : (
|
||||
<Card>
|
||||
<CardHeader className="flex flex-row items-center justify-between pb-2">
|
||||
<CardTitle className="text-base">Filters</CardTitle>
|
||||
|
||||
@@ -242,18 +242,16 @@ export default function Manufacturers() {
|
||||
)}
|
||||
>
|
||||
<div className="sticky top-24">
|
||||
{sidebarCollapsed ? (
|
||||
<Card className="p-2">
|
||||
<Button
|
||||
variant="ghost"
|
||||
className="w-full"
|
||||
onClick={() => setSidebarCollapsed(false)}
|
||||
title="Show filters"
|
||||
>
|
||||
<PanelLeftOpen className="w-5 h-5" />
|
||||
</Button>
|
||||
</Card>
|
||||
) : (
|
||||
{sidebarCollapsed ? (
|
||||
<Button
|
||||
variant="ghost"
|
||||
className="w-full"
|
||||
onClick={() => setSidebarCollapsed(false)}
|
||||
title="Show filters"
|
||||
>
|
||||
<PanelLeftOpen className="w-5 h-5" />
|
||||
</Button>
|
||||
) : (
|
||||
<Card>
|
||||
<CardHeader className="flex flex-row items-center justify-between pb-2">
|
||||
<CardTitle className="text-base">Filters</CardTitle>
|
||||
|
||||
@@ -300,18 +300,16 @@ const Operators = () => {
|
||||
)}
|
||||
>
|
||||
<div className="sticky top-24">
|
||||
{sidebarCollapsed ? (
|
||||
<Card className="p-2">
|
||||
<Button
|
||||
variant="ghost"
|
||||
className="w-full"
|
||||
onClick={() => setSidebarCollapsed(false)}
|
||||
title="Show filters"
|
||||
>
|
||||
<PanelLeftOpen className="w-5 h-5" />
|
||||
</Button>
|
||||
</Card>
|
||||
) : (
|
||||
{sidebarCollapsed ? (
|
||||
<Button
|
||||
variant="ghost"
|
||||
className="w-full"
|
||||
onClick={() => setSidebarCollapsed(false)}
|
||||
title="Show filters"
|
||||
>
|
||||
<PanelLeftOpen className="w-5 h-5" />
|
||||
</Button>
|
||||
) : (
|
||||
<Card>
|
||||
<CardHeader className="flex flex-row items-center justify-between pb-2">
|
||||
<CardTitle className="text-base">Filters</CardTitle>
|
||||
|
||||
@@ -500,23 +500,16 @@ export default function Parks() {
|
||||
)}
|
||||
>
|
||||
<div className="sticky top-24">
|
||||
{sidebarCollapsed ? (
|
||||
<Card className="p-2">
|
||||
<Button
|
||||
variant="ghost"
|
||||
className="w-full"
|
||||
onClick={() => setSidebarCollapsed(false)}
|
||||
title="Show filters"
|
||||
>
|
||||
<PanelLeftOpen className="w-5 h-5" />
|
||||
</Button>
|
||||
{activeFilterCount > 0 && (
|
||||
<Badge variant="secondary" className="w-full mt-2 justify-center">
|
||||
{activeFilterCount}
|
||||
</Badge>
|
||||
)}
|
||||
</Card>
|
||||
) : (
|
||||
{sidebarCollapsed ? (
|
||||
<Button
|
||||
variant="ghost"
|
||||
className="w-full"
|
||||
onClick={() => setSidebarCollapsed(false)}
|
||||
title="Show filters"
|
||||
>
|
||||
<PanelLeftOpen className="w-5 h-5" />
|
||||
</Button>
|
||||
) : (
|
||||
<Card>
|
||||
<CardHeader className="flex flex-row items-center justify-between pb-2">
|
||||
<CardTitle className="text-base">Filters</CardTitle>
|
||||
|
||||
@@ -250,18 +250,16 @@ export default function Rides() {
|
||||
)}
|
||||
>
|
||||
<div className="sticky top-24">
|
||||
{sidebarCollapsed ? (
|
||||
<Card className="p-2">
|
||||
<Button
|
||||
variant="ghost"
|
||||
className="w-full"
|
||||
onClick={() => setSidebarCollapsed(false)}
|
||||
title="Show filters"
|
||||
>
|
||||
<PanelLeftOpen className="w-5 h-5" />
|
||||
</Button>
|
||||
</Card>
|
||||
) : (
|
||||
{sidebarCollapsed ? (
|
||||
<Button
|
||||
variant="ghost"
|
||||
className="w-full"
|
||||
onClick={() => setSidebarCollapsed(false)}
|
||||
title="Show filters"
|
||||
>
|
||||
<PanelLeftOpen className="w-5 h-5" />
|
||||
</Button>
|
||||
) : (
|
||||
<Card>
|
||||
<CardHeader className="flex flex-row items-center justify-between pb-2">
|
||||
<CardTitle className="text-base">Filters</CardTitle>
|
||||
|
||||
Reference in New Issue
Block a user