mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-23 09:31:12 -05:00
Fix CollapsibleTrigger context error
This commit is contained in:
@@ -61,41 +61,41 @@ export function SearchFiltersComponent({ filters, onFiltersChange, activeTab }:
|
|||||||
const currentYear = new Date().getFullYear();
|
const currentYear = new Date().getFullYear();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Card className="w-full">
|
<Collapsible open={isOpen} onOpenChange={setIsOpen}>
|
||||||
<CollapsibleTrigger asChild>
|
<Card className="w-full">
|
||||||
<CardHeader className="cursor-pointer hover:bg-muted/50 transition-colors">
|
<CollapsibleTrigger asChild>
|
||||||
<div className="flex items-center justify-between" onClick={() => setIsOpen(!isOpen)}>
|
<CardHeader className="cursor-pointer hover:bg-muted/50 transition-colors">
|
||||||
<div className="flex items-center gap-2">
|
<div className="flex items-center justify-between">
|
||||||
<Filter className="w-5 h-5" />
|
<div className="flex items-center gap-2">
|
||||||
<CardTitle className="text-lg">Filters</CardTitle>
|
<Filter className="w-5 h-5" />
|
||||||
{hasActiveFilters && (
|
<CardTitle className="text-lg">Filters</CardTitle>
|
||||||
<Badge variant="secondary" className="ml-2">
|
{hasActiveFilters && (
|
||||||
Active
|
<Badge variant="secondary" className="ml-2">
|
||||||
</Badge>
|
Active
|
||||||
)}
|
</Badge>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
<div className="flex items-center gap-2">
|
||||||
|
{hasActiveFilters && (
|
||||||
|
<Button
|
||||||
|
variant="ghost"
|
||||||
|
size="sm"
|
||||||
|
onClick={(e) => {
|
||||||
|
e.stopPropagation();
|
||||||
|
clearFilters();
|
||||||
|
}}
|
||||||
|
className="text-xs"
|
||||||
|
>
|
||||||
|
<X className="w-4 h-4 mr-1" />
|
||||||
|
Clear
|
||||||
|
</Button>
|
||||||
|
)}
|
||||||
|
<ChevronDown className={`w-4 h-4 transition-transform ${isOpen ? 'rotate-180' : ''}`} />
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="flex items-center gap-2">
|
</CardHeader>
|
||||||
{hasActiveFilters && (
|
</CollapsibleTrigger>
|
||||||
<Button
|
|
||||||
variant="ghost"
|
|
||||||
size="sm"
|
|
||||||
onClick={(e) => {
|
|
||||||
e.stopPropagation();
|
|
||||||
clearFilters();
|
|
||||||
}}
|
|
||||||
className="text-xs"
|
|
||||||
>
|
|
||||||
<X className="w-4 h-4 mr-1" />
|
|
||||||
Clear
|
|
||||||
</Button>
|
|
||||||
)}
|
|
||||||
<ChevronDown className={`w-4 h-4 transition-transform ${isOpen ? 'rotate-180' : ''}`} />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</CardHeader>
|
|
||||||
</CollapsibleTrigger>
|
|
||||||
|
|
||||||
<Collapsible open={isOpen} onOpenChange={setIsOpen}>
|
|
||||||
<CollapsibleContent>
|
<CollapsibleContent>
|
||||||
<CardContent className="space-y-6">
|
<CardContent className="space-y-6">
|
||||||
{/* Park Filters */}
|
{/* Park Filters */}
|
||||||
@@ -381,7 +381,7 @@ export function SearchFiltersComponent({ filters, onFiltersChange, activeTab }:
|
|||||||
)}
|
)}
|
||||||
</CardContent>
|
</CardContent>
|
||||||
</CollapsibleContent>
|
</CollapsibleContent>
|
||||||
</Collapsible>
|
</Card>
|
||||||
</Card>
|
</Collapsible>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user