diff --git a/src/components/account/AccountCard/AccountCard.tsx b/src/components/account/AccountCard/AccountCard.tsx index 14ce7c2..ed684e8 100644 --- a/src/components/account/AccountCard/AccountCard.tsx +++ b/src/components/account/AccountCard/AccountCard.tsx @@ -7,6 +7,7 @@ import React from 'react'; import type { Account, AccountType } from '../../../types'; import { formatCurrency } from '../../../utils/format'; import { Icon } from '@iconify/react'; +import { isIconifyIcon } from '../../../utils/iconUtils'; import './AccountCard.css'; interface AccountCardProps { @@ -101,7 +102,9 @@ export const AccountCard: React.FC = ({
-
{icon}
+
+ {isIconifyIcon(icon) ? : icon} +
{onEdit && ( diff --git a/src/components/account/TransferForm/TransferForm.tsx b/src/components/account/TransferForm/TransferForm.tsx index d3b6ead..9f676d0 100644 --- a/src/components/account/TransferForm/TransferForm.tsx +++ b/src/components/account/TransferForm/TransferForm.tsx @@ -6,6 +6,7 @@ import React, { useState, useEffect } from 'react'; import type { Account, TransferFormInput } from '../../../types'; import { formatCurrency } from '../../../utils/format'; +import { getDisplayIcon } from '../../../utils/iconUtils'; import './TransferForm.css'; interface TransferFormProps { @@ -136,7 +137,7 @@ export const TransferForm: React.FC = ({ {accounts.map((account) => ( ))} @@ -179,7 +180,7 @@ export const TransferForm: React.FC = ({ {availableToAccounts.map((account) => ( ))} diff --git a/src/components/budget/AllocationRuleForm/AllocationRuleForm.tsx b/src/components/budget/AllocationRuleForm/AllocationRuleForm.tsx index 87a8e67..f4e0fc4 100644 --- a/src/components/budget/AllocationRuleForm/AllocationRuleForm.tsx +++ b/src/components/budget/AllocationRuleForm/AllocationRuleForm.tsx @@ -12,6 +12,7 @@ import type { AllocationTargetInput, } from '../../../services/allocationRuleService'; import { getTargetTypeLabel } from '../../../services/allocationRuleService'; +import { getDisplayIcon } from '../../../utils/iconUtils'; import './AllocationRuleForm.css'; interface AllocationRuleFormProps { @@ -283,7 +284,7 @@ export const AllocationRuleForm: React.FC = ({ {accounts.map((account) => ( ))} @@ -382,7 +383,7 @@ export const AllocationRuleForm: React.FC = ({ ) : ( accounts.map((account) => ( )) ) diff --git a/src/components/transaction/RecurringTransactionForm/RecurringTransactionForm.tsx b/src/components/transaction/RecurringTransactionForm/RecurringTransactionForm.tsx index d484717..c74e269 100644 --- a/src/components/transaction/RecurringTransactionForm/RecurringTransactionForm.tsx +++ b/src/components/transaction/RecurringTransactionForm/RecurringTransactionForm.tsx @@ -21,6 +21,7 @@ import { calculateNextOccurrence, } from '../../../services/recurringTransactionService'; import { Icon } from '@iconify/react'; +import { getDisplayIcon } from '../../../utils/iconUtils'; import './RecurringTransactionForm.css'; interface RecurringTransactionFormProps { @@ -417,7 +418,7 @@ export const RecurringTransactionForm: React.FC = {accounts.map((account) => ( ))} diff --git a/src/components/transaction/TransactionFilter/TransactionFilter.tsx b/src/components/transaction/TransactionFilter/TransactionFilter.tsx index 259172d..baac53e 100644 --- a/src/components/transaction/TransactionFilter/TransactionFilter.tsx +++ b/src/components/transaction/TransactionFilter/TransactionFilter.tsx @@ -9,6 +9,7 @@ import { Icon } from '@iconify/react'; import type { Category, Account, TransactionType } from '../../../types'; import { getCategories } from '../../../services/categoryService'; import { getAccounts } from '../../../services/accountService'; +import { getDisplayIcon } from '../../../utils/iconUtils'; import './TransactionFilter.css'; export interface FilterValues { @@ -256,8 +257,8 @@ export const TransactionFilter: React.FC = ({