Add progresive enhancment for tag picker when client js is available

This commit is contained in:
2026-01-16 13:51:06 -08:00
parent 560020632f
commit 9bf7827aa0
2 changed files with 109 additions and 92 deletions

View File

@@ -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>
)