Add progresive enhancment for tag picker when client js is available
This commit is contained in:
@@ -52,13 +52,11 @@ export function TagPicker({ searchParams }: { searchParams?: URLSearchParams })
|
||||
</ul>
|
||||
|
||||
{/* Show clear tags button if there are selected tags */}
|
||||
{selectedTags.length > 0 && (
|
||||
<div className="tag-actions">
|
||||
<a href="/" className="clear-tags-btn">
|
||||
Clear all filters
|
||||
</a>
|
||||
</div>
|
||||
)}
|
||||
<div className="tag-actions" style={{ display: selectedTags.length > 0 ? 'block' : 'none' }}>
|
||||
<a href="/" className="clear-tags-btn">
|
||||
Clear all filters
|
||||
</a>
|
||||
</div>
|
||||
<script dangerouslySetInnerHTML={{ __html: minifyJS(tagPickerScript) }} />
|
||||
</div>
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user