Feat: Serverseitige Fuzzy-Suche für /api/sounds und Client-Filter vereinfacht

This commit is contained in:
vibe-bot 2025-08-10 02:59:25 +02:00
parent 6f51c493ed
commit d975114768
2 changed files with 46 additions and 6 deletions

View file

@ -186,11 +186,8 @@ export default function App() {
})();
}, [selected]);
const filtered = useMemo(() => {
const q = query.trim().toLowerCase();
if (!q) return sounds;
return sounds.filter((s) => s.name.toLowerCase().includes(q));
}, [sounds, query]);
// Server liefert bereits gefilterte (und ggf. fuzzy-sortierte) Ergebnisse
const filtered = sounds;
const favCount = useMemo(() => Object.values(favs).filter(Boolean).length, [favs]);