调整部分bug

This commit is contained in:
myf 2022-05-07 15:44:53 +08:00
parent 07ad60da7c
commit 75daba74cf
7 changed files with 24 additions and 45 deletions

View File

@ -217,7 +217,7 @@
"Prize Pot": "奖金池", "Prize Pot": "奖金池",
"Winners": "获胜者", "Winners": "获胜者",
"No. Matched": "中的号码数", "No. Matched": "中的号码数",
"Approve Contract": "批准合约", "Approve %coin% Contract": "批准 %coin% 合约",
"%asset% staked": "%asset% 已质押", "%asset% staked": "%asset% 已质押",
"Total Value Locked": "锁定的总价值", "Total Value Locked": "锁定的总价值",
"Across all LPs and Syrup Pools": "在所有 LP 和 Syrup 资金池中", "Across all LPs and Syrup Pools": "在所有 LP 和 Syrup 资金池中",
@ -1117,6 +1117,7 @@
"Enter a keyword search": "输入关键字搜索", "Enter a keyword search": "输入关键字搜索",
"By using the invitation at the top right of the page, new users can be invited to enter and obtained after users purchase coins": "使用页面右上方的邀请,可邀请新用户进入,并在用户购买币后获得", "By using the invitation at the top right of the page, new users can be invited to enter and obtained after users purchase coins": "使用页面右上方的邀请,可邀请新用户进入,并在用户购买币后获得",
"The commission": "的提成!", "The commission": "的提成!",
"footer %number% text": "使用页面右上方的邀请,可邀请新用户进入,并在用户购买币后获得 %number% 的提成!",
"market value": "市值", "market value": "市值",
"Loaded all": "已加载全部", "Loaded all": "已加载全部",
"Insufficient Balance": "余额不足", "Insufficient Balance": "余额不足",

View File

@ -217,7 +217,7 @@
"Prize Pot": "Prize Pot", "Prize Pot": "Prize Pot",
"Winners": "Winners", "Winners": "Winners",
"No. Matched": "No. Matched", "No. Matched": "No. Matched",
"Approve Contract": "Approve Contract", "Approve %coin% Contract": "Approve %coin% Contract",
"%asset% staked": "%asset% staked", "%asset% staked": "%asset% staked",
"Total Value Locked": "Total Value Locked", "Total Value Locked": "Total Value Locked",
"Across all LPs and Syrup Pools": "Across all LPs and Syrup Pools", "Across all LPs and Syrup Pools": "Across all LPs and Syrup Pools",
@ -1246,6 +1246,7 @@
"Enter a keyword search": "Enter a keyword search", "Enter a keyword search": "Enter a keyword search",
"By using the invitation at the top right of the page, new users can be invited to enter and obtained after users purchase coins": "By using the invitation at the top right of the page, new users can be invited to enter and obtained after users purchase coins", "By using the invitation at the top right of the page, new users can be invited to enter and obtained after users purchase coins": "By using the invitation at the top right of the page, new users can be invited to enter and obtained after users purchase coins",
"The commission": "The commission", "The commission": "The commission",
"footer %number% text": "By using the invitation at the top right of the page, new users can be invited to enter and obtained after users purchase coins %number% The commission",
"market value": "market value", "market value": "market value",
"Loaded all": "Loaded all", "Loaded all": "Loaded all",
"HCC Currency amount": "HCC Currency amount", "HCC Currency amount": "HCC Currency amount",

View File

@ -89,7 +89,7 @@ const Boards: React.FC = () => {
if (item.pid === 1) { if (item.pid === 1) {
setBoardNum(item.num) setBoardNum(item.num)
} else if (item.pid === 2) { } else if (item.pid === 2) {
setHolder(item.waitWithdrawAmount) setHolder(item.num)
} }
}) })
setTotalAmount(total) setTotalAmount(total)

View File

@ -101,7 +101,7 @@ const BuyActions: React.FC = () => {
handleApprove(onUsdtApprove) handleApprove(onUsdtApprove)
}} }}
> >
{t('Approve %coin% Contract', { coin: 'usdt' })} {t('Approve %coin% Contract', { coin: 'USDT' })}
</Btn> </Btn>
)} )}
@ -112,7 +112,7 @@ const BuyActions: React.FC = () => {
handleApprove(onHccApprove) handleApprove(onHccApprove)
}} }}
> >
{t('Approve %coin% Contract', { coin: 'hcc' })} {t('Approve %coin% Contract', { coin: 'HCC' })}
</Btn> </Btn>
)} )}
{allowanceList?.usdt && allowanceList.hcc ? ( {allowanceList?.usdt && allowanceList.hcc ? (

View File

@ -51,10 +51,10 @@ const BuyNftModal: React.FC<BuyNftModalProps> = ({ onDismiss }) => {
const referralCommanderConfigInfo = useReferralCommanderConfigInfo() const referralCommanderConfigInfo = useReferralCommanderConfigInfo()
const referralRewardInfo = useReferralNormalConfigInfo() const referralRewardInfo = useReferralNormalConfigInfo()
return ( return (
<ModalDiv title={`${t('purchase')}${referralCommanderConfigInfo.properties.name}`} onDismiss={onDismiss}> <ModalDiv title={`${t('purchase')}${referralRewardInfo.properties?.name}`} onDismiss={onDismiss}>
<Flex alignItems="center" flexWrap="wrap" justifyContent="center"> <Flex alignItems="center" flexWrap="wrap" justifyContent="center">
<ImageDiv <ImageDiv
src={referralCommanderConfigInfo.properties.cover as string} src={referralCommanderConfigInfo.properties?.cover as string}
width={250} width={250}
height={250} height={250}
marginBottom="20px" marginBottom="20px"
@ -67,11 +67,8 @@ const BuyNftModal: React.FC<BuyNftModalProps> = ({ onDismiss }) => {
/> />
<TextFlex text={t('Enjoy a higher percentage than ordinary users')} color="#FFF9FA" /> <TextFlex text={t('Enjoy a higher percentage than ordinary users')} color="#FFF9FA" />
<TextFlex text={t('Commander NFT can be traded in the NFT market')} color="#F5FFF9" /> <TextFlex text={t('Commander NFT can be traded in the NFT market')} color="#F5FFF9" />
<FlexCom <FlexCom name={t('First stage sharing ratio')} value={`${referralCommanderConfigInfo.dividendFirst}%`} />
name={t('First stage sharing ratio')} <FlexCom name={t('Secondary split ratio')} value={`${referralCommanderConfigInfo.dividendSecond}%`} />
value={`${formatDivNumber(referralRewardInfo.dividendFirst)}%`}
/>
<FlexCom name={t('Secondary split ratio')} value={`${formatDivNumber(referralRewardInfo.dividendSecond)}%`} />
<FlexCom name={t('Contract address')} value={t('Contract address')} /> <FlexCom name={t('Contract address')} value={t('Contract address')} />
<FlexCom name={t('Assets agreement')} value={t('Assets agreement')} /> <FlexCom name={t('Assets agreement')} value={t('Assets agreement')} />
<FlexCom name={t('Assets and chain')} value={t('Assets and chain')} /> <FlexCom name={t('Assets and chain')} value={t('Assets and chain')} />

View File

@ -58,7 +58,6 @@ const ConnectedCom: React.FC = () => {
const [onBuyModal] = useModal(<BuyNftModal />) const [onBuyModal] = useModal(<BuyNftModal />)
const referralNormalConfigInfo = useReferralNormalConfigInfo() const referralNormalConfigInfo = useReferralNormalConfigInfo()
const referralRewardInfo = useReferralRewardInfo() const referralRewardInfo = useReferralRewardInfo()
const referralCommanderConfigInfo = useReferralCommanderConfigInfo()
const [loading, setLoading] = useState(false) const [loading, setLoading] = useState(false)
const withdraw = useWithdraw() const withdraw = useWithdraw()
const { toastSuccess } = useToast() const { toastSuccess } = useToast()
@ -76,11 +75,11 @@ const ConnectedCom: React.FC = () => {
<MainDiv> <MainDiv>
<HeaderMain title={t('recommend')} /> <HeaderMain title={t('recommend')} />
<> <>
<FlexCom name={t('The lower the number of')} value={`${referralRewardInfo?.inviteNum}(人)`} /> <FlexCom name={t('The lower the number of')} value={`${referralRewardInfo?.inviteNum || 0}(人)`} />
<FlexCom name={t('HCC total revenue')} value={`${referralRewardInfo?.inviteReward}(HCC)`} /> <FlexCom name={t('HCC total revenue')} value={`${referralRewardInfo?.inviteReward || 0}(HCC)`} />
<FlexCom <FlexCom
name={t('To get profit')} name={t('To get profit')}
value={`${referralRewardInfo?.inviteReward - referralRewardInfo?.inviteRewardReceive}(HCC)`} value={`${referralRewardInfo?.inviteReward - referralRewardInfo?.inviteRewardReceive || 0}(HCC)`}
/> />
</> </>
<FooterBtn> <FooterBtn>
@ -96,9 +95,7 @@ const ConnectedCom: React.FC = () => {
<UpBtn onClick={onBuyModal}>{t('Upgrade commander')}</UpBtn> <UpBtn onClick={onBuyModal}>{t('Upgrade commander')}</UpBtn>
</FooterBtn> </FooterBtn>
<FooterDiv> <FooterDiv>
<TextDiv>{`${t( <TextDiv>{t('footer %number% text', { number: `${referralNormalConfigInfo?.dividendFirst || 0}%` })}</TextDiv>
'By using the invitation at the top right of the page, new users can be invited to enter and obtained after users purchase coins',
)}${formatDivNumber(referralCommanderConfigInfo?.dividendFirst)}%${t('The commission')}`}</TextDiv>
{/* <TextDiv color="textSubtle">{t('each time')}</TextDiv> {/* <TextDiv color="textSubtle">{t('each time')}</TextDiv>
<TextDiv color="textSubtle">{t('last bid')}</TextDiv> <TextDiv color="textSubtle">{t('last bid')}</TextDiv>
<TextDiv color="textSubtle">{t('commission fee')}</TextDiv> */} <TextDiv color="textSubtle">{t('commission fee')}</TextDiv> */}

View File

@ -106,8 +106,8 @@ const RegimentalCom: React.FC = () => {
</LogoImage> </LogoImage>
<> <>
<FlexCom name={t('The lower the number of')} value={`${referralRewardInfo.inviteNum as number}(人)`} /> <FlexCom name={t('The lower the number of')} value={`${(referralRewardInfo.inviteNum as number) || 0}(人)`} />
<FlexCom name={t('total revenue')} value={`${referralRewardInfo.inviteReward as number}(HCC)`} /> <FlexCom name={t('total revenue')} value={`${(referralRewardInfo.inviteReward as number) || 0}(HCC)`} />
<FlexCom <FlexCom
name={t('revenue')} name={t('revenue')}
value={`${ value={`${
@ -116,31 +116,12 @@ const RegimentalCom: React.FC = () => {
/> />
<FlexCom <FlexCom
name={t('First stage sharing ratio')} name={t('First stage sharing ratio')}
value={`${formatDivNumber(referralCommanderConfigInfo.dividendFirst as number)}%`} value={`${formatDivNumber(referralCommanderConfigInfo.dividendFirst || 0)}%`}
/> />
<FlexCom <FlexCom
name={t('Secondary split ratio')} name={t('Secondary split ratio')}
value={`${formatDivNumber(referralCommanderConfigInfo.dividendSecond as number)}%`} value={`${formatDivNumber((referralCommanderConfigInfo.dividendSecond as number) || 0)}%`}
/> />
{/* <FlexCom name={t('First stage sharing ratio')} value="100000(人)" />
<FlexCom
name={t('HCC total revenue percentage :10%')}
paddings="0 10px"
leftColor="textSubtle"
value={`${referralCommanderConfigInfo.dividendFirst}%`}
/>
<FlexCom name={t('Number of secondary subordinates')} value="100000.00(人)" />
<FlexCom
name={t('HCC total revenue percentage :10%')}
paddings="0 10px"
leftColor="textSubtle"
value="100000.00(HCC)"
/>
<FlexCom name={t('HCC total revenue')} value={`${referralRewardInfo.inviteReward}(HCC)`} />
<FlexCom
name={t('To get profit')}
value={`${referralRewardInfo.inviteReward - referralRewardInfo.inviteRewardReceive}(HCC)`}
/> */}
</> </>
<FooterBtn> <FooterBtn>
@ -156,9 +137,11 @@ const RegimentalCom: React.FC = () => {
{/* <UpBtn>{t('Upgrade commander')}</UpBtn> */} {/* <UpBtn>{t('Upgrade commander')}</UpBtn> */}
</FooterBtn> </FooterBtn>
<FooterDiv> <FooterDiv>
<TextDiv>{`${t( <TextDiv>
'By using the invitation at the top right of the page, new users can be invited to enter and obtained after users purchase coins', {t('footer %number% text', {
)}${formatDivNumber(referralCommanderConfigInfo?.dividendFirst)}%${t('The commission')}`}</TextDiv> number: `${referralCommanderConfigInfo?.dividendFirst || 0}%`,
})}
</TextDiv>
{/* <TextDiv color="textSubtle">{t('each time')}</TextDiv> {/* <TextDiv color="textSubtle">{t('each time')}</TextDiv>
<TextDiv color="textSubtle">{t('last bid')}</TextDiv> <TextDiv color="textSubtle">{t('last bid')}</TextDiv>
<TextDiv color="textSubtle">{t('commission fee')}</TextDiv> */} <TextDiv color="textSubtle">{t('commission fee')}</TextDiv> */}