MCPcopy Create free account
hub / github.com/aiprodcoder/MIXAPI / renderStatus

Function renderStatus

web/src/components/table/RedemptionsTable.js:53–85  ·  view source on GitHub ↗
(status, record)

Source from the content-addressed store, hash-verified

51 };
52
53 const renderStatus = (status, record) => {
54 if (isExpired(record)) {
55 return (
56 <Tag color='orange' shape='circle'>{t('已过期')}</Tag>
57 );
58 }
59 switch (status) {
60 case 1:
61 return (
62 <Tag color='green' shape='circle'>
63 {t('未使用')}
64 </Tag>
65 );
66 case 2:
67 return (
68 <Tag color='red' shape='circle'>
69 {t('已禁用')}
70 </Tag>
71 );
72 case 3:
73 return (
74 <Tag color='grey' shape='circle'>
75 {t('已使用')}
76 </Tag>
77 );
78 default:
79 return (
80 <Tag color='black' shape='circle'>
81 {t('未知状态')}
82 </Tag>
83 );
84 }
85 };
86
87 const columns = [
88 {

Callers

nothing calls this directly

Calls 2

isExpiredFunction · 0.85
tFunction · 0.70

Tested by

no test coverage detected