调整董事会
This commit is contained in:
parent
6ccc4c4d55
commit
8ec7833ec8
|
|
@ -1128,5 +1128,7 @@
|
|||
"Unclaimed income": "待领取收益",
|
||||
"pledge": "质押",
|
||||
"Invite": "邀请",
|
||||
"top": "置顶"
|
||||
"top": "置顶",
|
||||
"Cancel the pledge": "取消质押",
|
||||
"Forced to cancel": "强制取消质押"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1255,5 +1255,7 @@
|
|||
"capital pool": "capital pool",
|
||||
"Unclaimed income": "Unclaimed income",
|
||||
"pledge": "pledge",
|
||||
"top": "top"
|
||||
"top": "top",
|
||||
"Cancel the pledge": "Cancel the pledge",
|
||||
"Forced to cancel": "Forced to cancel"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -135,7 +135,7 @@ const BoardCard: React.FC<NodeCardProps> = ({ board, account, boardsData }) => {
|
|||
{account && (
|
||||
<div>
|
||||
<FlexText name={t('HCC Currency amount')} value={board.userData?.amount as number} />
|
||||
{board.pid === 1 ? <FlexText name={t('Lock up time')} value={countDown} /> : ''}
|
||||
{board.pid === 1 && board.userData?.amount ? <FlexText name={t('Lock up time')} value={countDown} /> : ''}
|
||||
{/* <FlexText name={t('possess LP')} value={board.userData?.amount} /> */}
|
||||
<FlexText name={t('possess LP')} value={board.userData?.amount / boardsData?.curAmount || 0} />
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ const CardActions: React.FC<NodeCardActionsProps> = ({ board, account }) => {
|
|||
{t('Staked')}
|
||||
</Text>
|
||||
</Flex>
|
||||
<StakeAction stakedBalance={stakedBalance} tokenBalance={tokenBalance} pid={pid} />
|
||||
<StakeAction stakedBalance={stakedBalance} tokenBalance={tokenBalance} pid={pid} board={board} />
|
||||
<Flex flexDirection="column" alignItems="flex-start" mt="10">
|
||||
<Text color="textSubtle" fontSize="12px">
|
||||
{t('Unclaimed income')}
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ import styled from 'styled-components'
|
|||
import BigNumber from 'bignumber.js'
|
||||
import { Button, Flex, Heading, IconButton, AddIcon, MinusIcon, useModal } from '@pancakeswap/uikit'
|
||||
import { getBalanceNumber } from 'utils/formatBalance'
|
||||
import { Boards } from 'state/types'
|
||||
import { useBoardsFromPid } from 'state/hooks'
|
||||
import { useTranslation } from 'contexts/Localization'
|
||||
import useToast from 'hooks/useToast'
|
||||
|
|
@ -17,6 +18,7 @@ interface NodeCardActionsProps {
|
|||
tokenBalance?: BigNumber
|
||||
tokenName?: string
|
||||
pid?: number
|
||||
board?: Boards
|
||||
}
|
||||
|
||||
const IconButtonWrapper = styled.div`
|
||||
|
|
@ -25,8 +27,12 @@ const IconButtonWrapper = styled.div`
|
|||
width: 20px;
|
||||
}
|
||||
`
|
||||
const IconButtonDiv = styled(IconButton)`
|
||||
width: auto;
|
||||
padding: 0 10px;
|
||||
`
|
||||
|
||||
const StakeAction: React.FC<NodeCardActionsProps> = ({ stakedBalance, tokenBalance, tokenName, pid }) => {
|
||||
const StakeAction: React.FC<NodeCardActionsProps> = ({ stakedBalance, tokenBalance, tokenName, pid, board }) => {
|
||||
const { t } = useTranslation()
|
||||
const { toastWarning } = useToast()
|
||||
const { onStake } = useStakeBoard(pid)
|
||||
|
|
@ -64,12 +70,16 @@ const StakeAction: React.FC<NodeCardActionsProps> = ({ stakedBalance, tokenBalan
|
|||
) : (
|
||||
<IconButtonWrapper>
|
||||
{userData.stakedBalance > 0 ? (
|
||||
<IconButton variant="tertiary" onClick={handleUnstake}>
|
||||
<MinusIcon color="primary" />
|
||||
</IconButton>
|
||||
<IconButtonDiv variant="tertiary" onClick={handleUnstake}>
|
||||
{board.pid === 1
|
||||
? board.userData?.unlockTime * 1000 <= new Date().getTime()
|
||||
? t('Cancel the pledge')
|
||||
: t('Forced to cancel')
|
||||
: t('Cancel the pledge')}
|
||||
</IconButtonDiv>
|
||||
) : (
|
||||
<IconButton variant="tertiary" onClick={onPresentDeposit} ml="6px">
|
||||
<AddIcon color="primary" />
|
||||
<AddIcon color="primary" />2
|
||||
</IconButton>
|
||||
)}
|
||||
</IconButtonWrapper>
|
||||
|
|
|
|||
Loading…
Reference in New Issue