Skip to content

Commit

Permalink
enhancement(TransactionImport): don't show unwanted keys
Browse files Browse the repository at this point in the history
  • Loading branch information
Betree committed Dec 11, 2024
1 parent d33b3b3 commit 5b25b63
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { isEmpty, startCase } from 'lodash';
import { isEmpty, omit, startCase } from 'lodash';

Check failure on line 2 in components/dashboard/sections/transactions-imports/TransactionsImportRowDataLine.tsx

View workflow job for this annotation

GitHub Actions / lint

'omit' is defined but never used
import { ExternalLink } from 'lucide-react';
import { isURL } from 'validator';

Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit 5b25b63

Please sign in to comment.