diff --git a/build.zip b/build.zip new file mode 100644 index 0000000..e57bcb2 Binary files /dev/null and b/build.zip differ diff --git a/src/state/boards/fetchBoardsUser.ts b/src/state/boards/fetchBoardsUser.ts index 1ad0788..1aef6fe 100644 --- a/src/state/boards/fetchBoardsUser.ts +++ b/src/state/boards/fetchBoardsUser.ts @@ -58,7 +58,6 @@ export const fetchBoardUserInfo = async (account: string) => { stakedBalance: new BigNumber(userInfo.amount._hex).toJSON(), unLockTime: userInfo.unLockTime ? new BigNumber(userInfo.unLockTime._hex).toNumber() : 0, estimatedProfit: new BigNumber(estimatedProfit).toJSON(), - name: board.name, receiveReward: userInfo.receiveReward ? new BigNumber(userInfo.receiveReward._hex).toNumber() : 0, amount: getBalanceAmount(new BigNumber(userInfo.amount?._hex)).toNumber(), rewardDebt: getBalanceAmount(new BigNumber(userInfo.rewardDebt?._hex)).toNumber(), diff --git a/src/state/boards/index.ts b/src/state/boards/index.ts index 8a4d493..ad884c7 100644 --- a/src/state/boards/index.ts +++ b/src/state/boards/index.ts @@ -49,7 +49,6 @@ export const fetchBoardUserDataAsync = (account) => async (dispatch) => { stakedBalance: userInfo[index].stakedBalance, unlockTime: userInfo[index].unLockTime, estimatedProfit: userInfo[index].estimatedProfit, - name: userInfo[index].name, amount: userInfo[index].amount, rewardDebt: userInfo[index].rewardDebt, receiveReward: userInfo[index].receiveReward, diff --git a/src/views/Board/components/BoardCard/BoardCard.tsx b/src/views/Board/components/BoardCard/BoardCard.tsx index 99dae1f..eaea43f 100644 --- a/src/views/Board/components/BoardCard/BoardCard.tsx +++ b/src/views/Board/components/BoardCard/BoardCard.tsx @@ -100,9 +100,6 @@ interface NodeCardProps { const BoardCard: React.FC = ({ board, account, boardsData }) => { const { t } = useTranslation() const [countDown, setCountDown] = useState('') - const [boardsDataCurAmount] = boardsData.filter((item) => { - return item.pid === board.pid - }) useEffect(() => { const interval = setInterval(() => { if (board.userData?.unlockTime) { @@ -137,10 +134,10 @@ const BoardCard: React.FC = ({ board, account, boardsData }) => { {account && (
- + {board.pid === 1 ? : ''} {/* */} - +
)} diff --git a/src/views/Board/index.tsx b/src/views/Board/index.tsx index 5b5ec6f..a31611e 100644 --- a/src/views/Board/index.tsx +++ b/src/views/Board/index.tsx @@ -114,8 +114,8 @@ const Boards: React.FC = () => { return (
- {boardsList.map((board) => ( - + {boardsList.map((board, index) => ( + ))}
diff --git a/src/views/Referral/components/BuyActions.tsx b/src/views/Referral/components/BuyActions.tsx index d1ad26e..b018db6 100644 --- a/src/views/Referral/components/BuyActions.tsx +++ b/src/views/Referral/components/BuyActions.tsx @@ -20,6 +20,13 @@ const Btn = styled(Button)` background: linear-gradient(180deg, #7be0fc 0%, #ac7bf1 100%); border: none; ` +const AuthorizationBtn = styled(Button)` + width: 40%; + margin: 20px auto 0px auto; + border-radius: 50px; + background: linear-gradient(180deg, #7be0fc 0%, #ac7bf1 100%); + border: none; +` const BuyActions: React.FC = () => { const { t } = useTranslation() const account = useAccount() @@ -95,25 +102,25 @@ const BuyActions: React.FC = () => { return ( {!allowanceList.usdt && ( - { handleApprove(onUsdtApprove) }} > {t('Approve %coin% Contract', { coin: 'USDT' })} - + )} {!allowanceList.hcc && ( - { handleApprove(onHccApprove) }} > {t('Approve %coin% Contract', { coin: 'HCC' })} - + )} {allowanceList?.usdt && allowanceList.hcc ? ( diff --git a/src/views/Referral/components/BuyNftModal.tsx b/src/views/Referral/components/BuyNftModal.tsx index 5216787..2dc9a96 100644 --- a/src/views/Referral/components/BuyNftModal.tsx +++ b/src/views/Referral/components/BuyNftModal.tsx @@ -1,4 +1,4 @@ -import React, { useEffect, useState } from 'react' +import React, { useState, useMemo } from 'react' import styled from 'styled-components' import { formatDivNumber } from 'utils/formatBalance' import { useTranslation } from 'contexts/Localization' @@ -9,7 +9,7 @@ import TextFlex from './TextFlex' import FlexCom from './FlexCom' const ModalDiv = styled(Modal)` - width: 60%; + width: 50%; ${({ theme }) => theme.mediaQueries.xs} { } @@ -66,7 +66,7 @@ const BuyNftModal: React.FC = ({ onDismiss }) => { const referralRewardInfo = useReferralNormalConfigInfo() const [price, setPrice] = useState('') - useEffect(() => { + useMemo(() => { const priceList = [] referralCommanderConfigInfo?.properties?.price && Object.keys(referralCommanderConfigInfo?.properties?.price).forEach((item) => { @@ -76,7 +76,7 @@ const BuyNftModal: React.FC = ({ onDismiss }) => { }, [referralCommanderConfigInfo]) return ( - + = ({ onDismiss }) => { /> - - + + diff --git a/src/views/Referral/index.tsx b/src/views/Referral/index.tsx index f3fcbb4..346e024 100644 --- a/src/views/Referral/index.tsx +++ b/src/views/Referral/index.tsx @@ -19,7 +19,7 @@ const MainDiv = styled.div` ` const ContentDiv = styled.div` - width: 60%; + width: 50%; background: rgba(255, 255, 255, 0.39); box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.16); border-radius: 40px;