调整代码
This commit is contained in:
parent
7e3b354b3e
commit
15b05e3aab
|
|
@ -1,6 +1,7 @@
|
|||
import React from 'react'
|
||||
import styled from 'styled-components'
|
||||
import { Tag, Flex, Heading, Image } from '@pancakeswap/uikit'
|
||||
import { useAccount } from 'state/userInfo/hooks'
|
||||
import Question from 'components/QuestionHelper'
|
||||
import { useTranslation } from 'contexts/Localization'
|
||||
|
||||
|
|
@ -23,7 +24,7 @@ const Wrapper = styled(Flex)`
|
|||
svg {
|
||||
margin-right: 4px;
|
||||
}
|
||||
.ribbon {
|
||||
.corner-mark {
|
||||
width: 88px;
|
||||
height: 89px;
|
||||
overflow: hidden;
|
||||
|
|
@ -32,7 +33,7 @@ const Wrapper = styled(Flex)`
|
|||
right: 0px;
|
||||
}
|
||||
|
||||
.ribbon1 {
|
||||
.ribbon {
|
||||
line-height: 12px;
|
||||
text-align: center;
|
||||
transform: rotate(50deg);
|
||||
|
|
@ -70,6 +71,7 @@ const HeaderFlex = styled(Flex)``
|
|||
|
||||
const CardHeading: React.FC<ExpandableSectionProps> = ({ name, img, tokenSymbol, amount }) => {
|
||||
const { t } = useTranslation()
|
||||
const account = useAccount()
|
||||
|
||||
return (
|
||||
<Wrapper justifyContent="space-between" alignItems="center" mb="12px">
|
||||
|
|
@ -78,9 +80,9 @@ const CardHeading: React.FC<ExpandableSectionProps> = ({ name, img, tokenSymbol,
|
|||
<Heading mb="4px">{name}</Heading>
|
||||
{/* <Question text={t('To join board, you need to stake at least 0.1% total supply of Token')} /> */}
|
||||
</HeaderFlex>
|
||||
{amount > 0 && (
|
||||
<div className="ribbon">
|
||||
<div className="ribbon1">{t('Staked')}</div>
|
||||
{amount > 0 && account && (
|
||||
<div className="corner-mark">
|
||||
<div className="ribbon">{t('Staked')}</div>
|
||||
</div>
|
||||
)}
|
||||
</Wrapper>
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@ const Boards: React.FC = () => {
|
|||
// totalAmount: getBalanceAmount(new BigNumber(boardPoolInfo.totalAmount._hex)).toNumber(),
|
||||
holderNum: new BigNumber(boardPoolInfo?.holderNum?._hex).toNumber(),
|
||||
waitWithdrawAmount: getBalanceAmount(new BigNumber(waitWithdrawAmount.balance._hex)).toNumber(),
|
||||
totalReward: new BigNumber(boardPoolInfo?.totalReward?._hex).toNumber(),
|
||||
totalReward: getBalanceAmount(new BigNumber(boardPoolInfo?.totalReward?._hex)).toNumber(),
|
||||
}
|
||||
}),
|
||||
)
|
||||
|
|
|
|||
|
|
@ -116,11 +116,11 @@ const RegimentalCom: React.FC = () => {
|
|||
/>
|
||||
<FlexCom
|
||||
name={t('First stage sharing ratio')}
|
||||
value={`${formatDivNumber(referralCommanderConfigInfo.dividendFirst || 0)}%`}
|
||||
value={`${referralCommanderConfigInfo.dividendFirst as number}%`}
|
||||
/>
|
||||
<FlexCom
|
||||
name={t('Secondary split ratio')}
|
||||
value={`${formatDivNumber((referralCommanderConfigInfo.dividendSecond as number) || 0)}%`}
|
||||
value={`${referralCommanderConfigInfo.dividendSecond as number}%`}
|
||||
/>
|
||||
</>
|
||||
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ const Nft: React.FC = () => {
|
|||
const referralIsCommander = useReferralIsCommander()
|
||||
useEffect(() => {
|
||||
dispatch(fetchReferralInfoAsync(account))
|
||||
}, [account])
|
||||
}, [account, referralIsCommander])
|
||||
|
||||
return (
|
||||
<MainDiv>
|
||||
|
|
|
|||
Loading…
Reference in New Issue