Fix TypeScript errors and apply t('home.count') to all-transaction page
- Fix TypeScript errors in list-summary-extend-settlement.tsx
- Add || 0 fallback for undefined values (transactionAmount, pgFeeAmount, holdAmount, releaseAmount, offsetAmount)
- Apply t('home.count') to all-transaction list page
- Replace NumericFormat with consistent locale pattern
- Remove NumericFormat import
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -20,31 +20,31 @@ export const ListSummaryExtendSettlement = ({
|
||||
<li className="summary-amount-item">
|
||||
<span className="label">{t('settlement.transactionAmount')}</span>
|
||||
<span className="value">
|
||||
{t('home.money', { value: new Intl.NumberFormat('en-US').format(transactionAmount) })}
|
||||
{t('home.money', { value: new Intl.NumberFormat('en-US').format(transactionAmount || 0) })}
|
||||
</span>
|
||||
</li>
|
||||
<li className="summary-amount-item">
|
||||
<span className="label">{t('settlement.totalPgFee')}</span>
|
||||
<span className="value minus">
|
||||
{t('home.money', { value: new Intl.NumberFormat('en-US').format(pgFeeAmount) })}
|
||||
{t('home.money', { value: new Intl.NumberFormat('en-US').format(pgFeeAmount || 0) })}
|
||||
</span>
|
||||
</li>
|
||||
<li className="summary-amount-item">
|
||||
<span className="label">{t('settlement.hold')}</span>
|
||||
<span className="value">
|
||||
{t('home.money', { value: new Intl.NumberFormat('en-US').format(holdAmount) })}
|
||||
{t('home.money', { value: new Intl.NumberFormat('en-US').format(holdAmount || 0) })}
|
||||
</span>
|
||||
</li>
|
||||
<li className="summary-amount-item">
|
||||
<span className="label">{t('settlement.release')}</span>
|
||||
<span className="value link">
|
||||
{t('home.money', { value: new Intl.NumberFormat('en-US').format(releaseAmount) })}
|
||||
{t('home.money', { value: new Intl.NumberFormat('en-US').format(releaseAmount || 0) })}
|
||||
</span>
|
||||
</li>
|
||||
<li className="summary-amount-item">
|
||||
<span className="label">{t('settlement.offset')}</span>
|
||||
<span className="value minus">
|
||||
{t('home.money', { value: new Intl.NumberFormat('en-US').format(offsetAmount) })}
|
||||
{t('home.money', { value: new Intl.NumberFormat('en-US').format(offsetAmount || 0) })}
|
||||
</span>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import moment from 'moment';
|
||||
import { useStore } from '@/shared/model/store';
|
||||
import { ChangeEvent, useEffect, useState } from 'react';
|
||||
import { NumericFormat } from 'react-number-format';
|
||||
import { IMAGE_ROOT } from '@/shared/constants/common';
|
||||
import { PATHS } from '@/shared/constants/paths';
|
||||
import { useNavigate } from '@/shared/lib/hooks/use-navigate';
|
||||
@@ -294,14 +293,7 @@ export const AllTransactionListPage = () => {
|
||||
<div className="detail-item">
|
||||
<span className="detail-label">{t('transaction.transactionCount')}</span>
|
||||
<span className="detail-value">
|
||||
{ t('transaction.total') + ' '}
|
||||
<NumericFormat
|
||||
value={ totalCount }
|
||||
allowNegative={ true }
|
||||
thousandSeparator
|
||||
displayType="text"
|
||||
suffix={' ' + t('home.count')}
|
||||
></NumericFormat>
|
||||
{t('transaction.total')} {t('home.count', { value: new Intl.NumberFormat('en-US').format(totalCount || 0) })}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user