refactoring: update severals components

This commit is contained in:
Simon Vieille
2025-04-04 20:13:15 +02:00
parent 4f261c434d
commit d8a622ce0f
37 changed files with 1857 additions and 1782 deletions
+26
View File
@@ -0,0 +1,26 @@
const containsAppsMatchingSearch = (values, search) => {
if (search.value.trim() === '') {
return true
}
for (let key in values) {
if (isAppMatchingSearch(values[key].name)) {
return true
}
}
return false
}
const isAppMatchingSearch = (item, search) => {
if (search.value.trim() === '') {
return true
}
return item.name.toLowerCase().includes(search.value.trim().toLowerCase())
}
export {
containsAppsMatchingSearch,
isAppMatchingSearch,
}