From 5b25b637fc081ace4db6018942ad7d2db5a103e3 Mon Sep 17 00:00:00 2001 From: Benjamin Piouffle Date: Tue, 10 Dec 2024 16:33:20 +0100 Subject: [PATCH] enhancement(TransactionImport): don't show unwanted keys --- .../TransactionsImportRowDataLine.tsx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/components/dashboard/sections/transactions-imports/TransactionsImportRowDataLine.tsx b/components/dashboard/sections/transactions-imports/TransactionsImportRowDataLine.tsx index 7a1e463a0d0..e08977e399f 100644 --- a/components/dashboard/sections/transactions-imports/TransactionsImportRowDataLine.tsx +++ b/components/dashboard/sections/transactions-imports/TransactionsImportRowDataLine.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { isEmpty, startCase } from 'lodash'; +import { isEmpty, omit, startCase } from 'lodash'; import { ExternalLink } from 'lucide-react'; import { isURL } from 'validator'; @@ -71,9 +71,13 @@ const filterEmptyValues = value => { return value; }; +const checkIfKeyIsUnwanted = (key: string) => { + return ['personal_finance_category_icon_url'].includes(key); +}; + export const TransactionsImportRowDataLine = ({ value, labelKey, level = 0 }) => { const cleanValue = React.useMemo(() => filterEmptyValues(value), [value]); - if (!cleanValue) { + if (checkIfKeyIsUnwanted(labelKey) || !cleanValue) { return null; }