diff --git a/packages/desktop-client/src/components/modals/ImportTransactions.jsx b/packages/desktop-client/src/components/modals/ImportTransactions.jsx index 79f23a37a84..f6c197d92f5 100644 --- a/packages/desktop-client/src/components/modals/ImportTransactions.jsx +++ b/packages/desktop-client/src/components/modals/ImportTransactions.jsx @@ -327,7 +327,8 @@ function Transaction({ multiplierAmount, categories, }) { - const categoryList = categories.map(category => category.name); + const [category, setCategory] = useState(); + const categoryList = categories.list.map(category => category.name); const transaction = useMemo( () => fieldMappings @@ -348,6 +349,8 @@ function Transaction({ outflow = amountToCurrency(outflow); inflow = amountToCurrency(inflow); + const filteredList = categories.list.filter(cat => cat.name === transaction.category); + return ( - {categoryList.includes(transaction.category) && transaction.category} + {filteredList.length > 1 ? +