Feat: Serverseitige Fuzzy-Suche für /api/sounds und Client-Filter vereinfacht
This commit is contained in:
parent
6f51c493ed
commit
d975114768
2 changed files with 46 additions and 6 deletions
|
|
@ -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]);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue