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

- Remove NumericFormat import dependency
- Replace 3 NumericFormat instances with t('home.money') pattern
- Remove hardcoded currency unit (원) - now included in locale
- Add null safety with || 0 for all amount values
- Applied to:
  - Dynamic settlement info fields (newSettlementInfo)
  - Escrow approval settlement amount
  - Escrow cancel settlement amount

🤖 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:27:33 +09:00
parent a5fd4b5299
commit c92e1a7bc6

View File

@@ -1,6 +1,5 @@
import moment from 'moment';
import { useTranslation } from 'react-i18next';
import { NumericFormat } from 'react-number-format';
import { SectionTitleArrow } from '@/entities/common/ui/section-title-arrow';
import { InfoSectionKeys, InfoSectionProps, TransactionCategory } from '../../model/types';
import { SlideDown } from 'react-slidedown';
@@ -74,12 +73,7 @@ export const SettlementInfoSection = ({
newSettlementInfo[k]
}
{ (checkValue(newSettlementInfo[k]) && subItems[k]?.type === 'number') &&
<NumericFormat
value={ newSettlementInfo[k] }
thousandSeparator
displayType="text"
suffix='원'
></NumericFormat>
t('home.money', { value: new Intl.NumberFormat('en-US').format(newSettlementInfo[k] || 0) })
}
{ (checkValue(newSettlementInfo[k]) && subItems[k]?.type === 'date') &&
moment(newSettlementInfo[k]).format('YYYY.MM.DD')
@@ -124,12 +118,7 @@ export const SettlementInfoSection = ({
<li className="kv-row">
<span className="k">·&nbsp;&nbsp;{t('transaction.fields.approvalSettlementAmount')}</span>
<span className="v">
<NumericFormat
value={ settlementInfo?.approvalSettlementAmount }
thousandSeparator
displayType="text"
suffix='원'
></NumericFormat>
{t('home.money', { value: new Intl.NumberFormat('en-US').format(settlementInfo?.approvalSettlementAmount || 0) })}
</span>
</li>
<li className="kv-row">
@@ -139,12 +128,7 @@ export const SettlementInfoSection = ({
<li className="kv-row">
<span className="k">·&nbsp;&nbsp;{t('transaction.fields.cancelSettlementAmount')}</span>
<span className="v">
<NumericFormat
value={ settlementInfo?.cancelSettlementAmount }
thousandSeparator
displayType="text"
suffix='원'
></NumericFormat>
{t('home.money', { value: new Intl.NumberFormat('en-US').format(settlementInfo?.cancelSettlementAmount || 0) })}
</span>
</li>
</>