Open source personal finance application
feat(getCategories): refactor
ilkomed7f8d8860f57
diff --git a/components/categories/getCategories.ts b/components/categories/getCategories.tsindex e28ce280..765359b0 100644--- a/components/categories/getCategories.ts+++ b/components/categories/getCategories.ts@@ -14,11 +14,10 @@ export function getCatsIds(catsIds, catsItems) {// TODO: add typingsexport function getTransferCatgoriesIds(categoriesItems) {- const categoriesIdsByName = Object.keys(categoriesItems)- .filter(id =>- categoriesItems[id].name.toLowerCase() === 'перевод'- || categoriesItems[id].name.toLowerCase() === 'transfer',- )+ const names = ['перевод', 'transfer']+ const categoriesIdsByName = Object+ .keys(categoriesItems)+ .filter(id => names.includes(categoriesItems[id].name.toLowerCase()))return [...categoriesIdsByName, 'transfer']}