Apply t('home.money') localization to transaction-info-section

- Remove NumericFormat import dependency
- Replace NumericFormat with t('home.money') pattern for amount display
- Remove hardcoded currency unit (원) - now included in locale
- Add null safety with || 0 for amount values
- Applied to dynamic transaction info fields (newTransactionInfo)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Jay Sheen
2025-11-04 18:29:33 +09:00
parent c92e1a7bc6
commit 7ee1bc5d58

View File

@@ -2,7 +2,6 @@ import moment from 'moment';
import { useTranslation } from 'react-i18next';
import { SectionTitleArrow } from '@/entities/common/ui/section-title-arrow';
import { InfoSectionKeys, InfoSectionProps, TransactionCategory } from '../../model/types';
import { NumericFormat } from 'react-number-format';
import { SlideDown } from 'react-slidedown';
import 'react-slidedown/lib/slidedown.css';
@@ -80,12 +79,7 @@ export const TransactionInfoSection = ({
newTransactionInfo[k]
}
{ (checkValue(newTransactionInfo[k]) && subItems[k]?.type === 'number') &&
<NumericFormat
value={ newTransactionInfo[k] }
thousandSeparator
displayType="text"
suffix='원'
></NumericFormat>
t('home.money', { value: new Intl.NumberFormat('en-US').format(newTransactionInfo[k] || 0) })
}
{ (checkValue(newTransactionInfo[k]) && subItems[k]?.type === 'date') &&
moment(newTransactionInfo[k]).format('YYYY.MM.DD')