From 491f13b17202583bc5dd681ac605d54e664b79c6 Mon Sep 17 00:00:00 2001 From: myf <> Date: Sun, 24 Apr 2022 21:18:40 +0800 Subject: [PATCH] =?UTF-8?q?=E9=83=A8=E5=88=86=E5=86=9B=E5=9B=A2=E9=95=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/locales/zh-CN.json | 3 ++- src/config/localization/translations.json | 3 ++- src/views/Referral/components/BuyNftModal.tsx | 13 ++++++++++--- src/views/Referral/index.tsx | 4 ++-- 4 files changed, 16 insertions(+), 7 deletions(-) diff --git a/public/locales/zh-CN.json b/public/locales/zh-CN.json index 1beffd8..fd94b58 100644 --- a/public/locales/zh-CN.json +++ b/public/locales/zh-CN.json @@ -1114,5 +1114,6 @@ "Number of boards":"董事会数量", "Number of holders":"持有人数量", "total revenue":"总收益", - "revenue":"收益" + "revenue":"收益", + "purchase":"购买" } diff --git a/src/config/localization/translations.json b/src/config/localization/translations.json index cc38b45..38f3750 100644 --- a/src/config/localization/translations.json +++ b/src/config/localization/translations.json @@ -1241,5 +1241,6 @@ "Number of boards":"Number of boards", "Number of holders":"Number of holders", "total revenue":"total revenue", - "revenue":"revenue" + "revenue":"revenue", + "purchase":"purchase" } diff --git a/src/views/Referral/components/BuyNftModal.tsx b/src/views/Referral/components/BuyNftModal.tsx index 1340163..ff31720 100644 --- a/src/views/Referral/components/BuyNftModal.tsx +++ b/src/views/Referral/components/BuyNftModal.tsx @@ -1,7 +1,7 @@ import React from 'react' import styled from 'styled-components' import { useTranslation } from 'contexts/Localization' -import { useReferralNormalConfigInfo } from 'state/referral/hooks' +import { useReferralNormalConfigInfo, useReferralCommanderConfigInfo } from 'state/referral/hooks' import { Flex, Button, Modal, Image } from '@pancakeswap/uikit' import TextFlex from './TextFlex' import FlexCom from './FlexCom' @@ -50,12 +50,19 @@ const ImageDiv = styled(Image)` const BuyNftModal: React.FC = () => { const { t } = useTranslation() + const referralCommanderConfigInfo = useReferralCommanderConfigInfo() const referralRewardInfo = useReferralNormalConfigInfo() // const onDismiss = () => {} return ( - + - + + {/* */} { const dispatch = useDispatch() const account = useAccount() - const referralIsCommander = useReferralIsCommander() - // const referralIsCommander = true + // const referralIsCommander = useReferralIsCommander() + const referralIsCommander = false console.log('referralIsCommander:', referralIsCommander) useEffect(() => { dispatch(fetchReferralInfoAsync(account))