From 249461389e9e041d32d38bd3504aaadee61399f8 Mon Sep 17 00:00:00 2001 From: Jay Sheen Date: Tue, 4 Nov 2025 17:30:43 +0900 Subject: [PATCH] Apply t('home.money') localization to transaction amount-info-section MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Remove NumericFormat import dependency - Replace 23 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 all transaction categories: - AllTransaction (various service codes) - CashReceipt (supplyAmount, vat, serviceAmount, taxFreeAmount) - Escrow (cardAmount, pointAmount, couponAmount, escrowFee) - Simple payment services (Kakao, Naver, Toss, Payco) - Billing 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- .../ui/section/amount-info-section.tsx | 142 +++--------------- 1 file changed, 24 insertions(+), 118 deletions(-) diff --git a/src/entities/transaction/ui/section/amount-info-section.tsx b/src/entities/transaction/ui/section/amount-info-section.tsx index 51a99b9..1d12cd9 100644 --- a/src/entities/transaction/ui/section/amount-info-section.tsx +++ b/src/entities/transaction/ui/section/amount-info-section.tsx @@ -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 { useDownloadConfirmationMutation } from '../../api/use-download-confirmation-mutation'; import { InfoSectionKeys, InfoSectionProps, TransactionCategory } from '../../model/types'; @@ -119,11 +118,7 @@ export const AmountInfoSection = ({ } } rs.push( - + t('home.money', { value: new Intl.NumberFormat('en-US').format(value || 0) }) ) } return rs; @@ -202,43 +197,22 @@ export const AmountInfoSection = ({
{ (transactionCategory === TransactionCategory.AllTransaction) && (serviceCode === '01' || serviceCode === '02' || serviceCode === '03' || serviceCode === '26') && - + t('home.money', { value: new Intl.NumberFormat('en-US').format(amountInfo?.transactionRequestAmount || 0) }) } { (transactionCategory === TransactionCategory.AllTransaction) && - (serviceCode === '05' || serviceCode === '14' || serviceCode === '21' + (serviceCode === '05' || serviceCode === '14' || serviceCode === '21' || serviceCode === '24' || serviceCode === '31') && - + t('home.money', { value: new Intl.NumberFormat('en-US').format(amountInfo?.transactionAmount || 0) }) } { (transactionCategory === TransactionCategory.CashReceipt) && - + t('home.money', { value: new Intl.NumberFormat('en-US').format(amountInfo?.amount || 0) }) } { (transactionCategory === TransactionCategory.Escrow) && - + t('home.money', { value: new Intl.NumberFormat('en-US').format(amountInfo?.approvalRequestAmount || 0) }) } { (transactionCategory === TransactionCategory.Billing) && - + t('home.money', { value: new Intl.NumberFormat('en-US').format(amountInfo?.transactionAmount || 0) }) } -