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:
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user