- 가맹점관리 _ 등록현황 _ 에스크로 가입현황 섹션 에스크로 가입 Enum Value 다국어 적용
This commit is contained in:
@@ -1,13 +1,24 @@
|
||||
import { TFunction } from 'i18next';
|
||||
import { UsageStatus } from './types';
|
||||
import { EscrowStatus, UsageStatus } from './types';
|
||||
|
||||
export const getUsageStatusName = (t: TFunction, usageStatus?: string): string => {
|
||||
if (!usageStatus) return '';
|
||||
|
||||
const statusMap: Record<string, string> = {
|
||||
[UsageStatus.AVAILABLE]: t('merchant.available'),
|
||||
[UsageStatus.SUSPENDED]: t('merchant.suspended'),
|
||||
[UsageStatus.AVAILABLE]: t('merchant.usageStatus.available'),
|
||||
[UsageStatus.SUSPENDED]: t('merchant.usageStatus.suspended'),
|
||||
};
|
||||
|
||||
return statusMap[usageStatus] || usageStatus;
|
||||
};
|
||||
|
||||
export const getEscrowStatusName = (t: TFunction, escrowStatus?: string): string => {
|
||||
if (!escrowStatus) return '';
|
||||
|
||||
const statusMap: Record<string, string> = {
|
||||
[EscrowStatus.ACTIVE]: t('merchant.escrowStatus.active'),
|
||||
[EscrowStatus.INACTIVE]: t('merchant.escrowStatus.inactive')
|
||||
};
|
||||
|
||||
return statusMap[escrowStatus] || escrowStatus;
|
||||
};
|
||||
@@ -1,6 +1,7 @@
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { SectionTitleArrow } from '@/entities/common/ui/section-title-arrow';
|
||||
import { Escrow, SectionKeys } from '../../model/types';
|
||||
import { getEscrowStatusName } from '../../model/constant';
|
||||
import SlideDown from 'react-slidedown';
|
||||
import 'react-slidedown/lib/slidedown.css';
|
||||
import { useEffect, useState } from 'react';
|
||||
@@ -66,7 +67,7 @@ export const EscrowSection = ({
|
||||
</li>
|
||||
<li className="kv-row">
|
||||
<span className="k">{t('merchant.nicecrowJoin')}</span>
|
||||
<span className="v">{ escrowStatus }</span>
|
||||
<span className="v">{ getEscrowStatusName(t, escrowStatus) }</span>
|
||||
</li>
|
||||
<li className="kv-row">
|
||||
<span className="k">{t('merchant.location')}</span>
|
||||
|
||||
Reference in New Issue
Block a user