fix: do not show dollar balance if not enabled

This commit is contained in:
JustSong
2023-06-21 15:45:30 +08:00
parent 1b5c628e66
commit 6536a7be62
3 changed files with 14 additions and 5 deletions

View File

@@ -2,7 +2,7 @@ import React, { useEffect, useState } from 'react';
import { Button, Form, Header, Segment } from 'semantic-ui-react';
import { useParams } from 'react-router-dom';
import { API, downloadTextAsFile, showError, showSuccess } from '../../helpers';
import { renderQuota } from '../../helpers/render';
import { renderQuota, renderQuotaWithPrompt } from '../../helpers/render';
const EditRedemption = () => {
const params = useParams();
@@ -11,7 +11,7 @@ const EditRedemption = () => {
const [loading, setLoading] = useState(isEdit);
const originInputs = {
name: '',
quota: 100,
quota: 100000,
count: 1
};
const [inputs, setInputs] = useState(originInputs);
@@ -88,7 +88,7 @@ const EditRedemption = () => {
</Form.Field>
<Form.Field>
<Form.Input
label={`额度(等价金额 ${renderQuota(quota)}`}
label={`额度${renderQuotaWithPrompt(quota)}`}
name='quota'
placeholder={'请输入单个兑换码中包含的额度'}
onChange={handleInputChange}