diff --git a/public/locales/zh-CN.json b/public/locales/zh-CN.json index 3406185..5592efc 100644 --- a/public/locales/zh-CN.json +++ b/public/locales/zh-CN.json @@ -1116,5 +1116,7 @@ "total revenue":"总收益", "revenue":"收益", "purchase":"购买", - "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":"使用页面右上方的邀请,可邀请新用户进入,并在用户购买币后获得", + "The commission":"的提成!" } diff --git a/src/config/localization/translations.json b/src/config/localization/translations.json index 7a06a8d..4373195 100644 --- a/src/config/localization/translations.json +++ b/src/config/localization/translations.json @@ -1243,5 +1243,7 @@ "total revenue":"total revenue", "revenue":"revenue", "purchase":"purchase", - "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", + "The commission":"The commission!" } diff --git a/src/views/Referral/components/Connected.tsx b/src/views/Referral/components/Connected.tsx index e89a475..6407c7b 100644 --- a/src/views/Referral/components/Connected.tsx +++ b/src/views/Referral/components/Connected.tsx @@ -3,7 +3,11 @@ import styled from 'styled-components' import { useTranslation } from 'contexts/Localization' import { Button, useModal, Text } from '@pancakeswap/uikit' import { inviteReceive } from 'services/referral' -import { useReferralNormalConfigInfo, useReferralRewardInfo } from 'state/referral/hooks' +import { + useReferralNormalConfigInfo, + useReferralCommanderConfigInfo, + useReferralRewardInfo, +} from 'state/referral/hooks' import FlexCom from './FlexCom' import BuyNftModal from './BuyNftModal' import HeaderMain from './HeaderMain' @@ -54,6 +58,7 @@ const ConnectedCom: React.FC = () => { console.log('referralNormalConfigInfo:', referralNormalConfigInfo) const referralRewardInfo = useReferralRewardInfo() console.log('referralRewardInfo:', referralRewardInfo) + const referralCommanderConfigInfo = useReferralCommanderConfigInfo() const getInviteReceive = async () => { await inviteReceive() } @@ -81,9 +86,12 @@ const ConnectedCom: React.FC = () => { {t('Upgrade commander')} - {t('each time')} + {`${t( + 'By using the invitation at the top right of the page, new users can be invited to enter and obtained after users purchase coins', + )}${referralCommanderConfigInfo.dividendFirst / 10000}%${t('The commission')}`} + {/* {t('each time')} {t('last bid')} - {t('commission fee')} + {t('commission fee')} */} ) diff --git a/src/views/Referral/components/Regimental.tsx b/src/views/Referral/components/Regimental.tsx index e13d452..d88649e 100644 --- a/src/views/Referral/components/Regimental.tsx +++ b/src/views/Referral/components/Regimental.tsx @@ -140,9 +140,12 @@ const RegimentalCom: React.FC = () => { {/* {t('Upgrade commander')} */} - {t('each time')} + {`${t( + 'By using the invitation at the top right of the page, new users can be invited to enter and obtained after users purchase coins', + )}${referralCommanderConfigInfo.dividendFirst / 10000}%${t('The commission')}`} + {/* {t('each time')} {t('last bid')} - {t('commission fee')} + {t('commission fee')} */} diff --git a/src/views/Referral/components/UnunitedCom.tsx b/src/views/Referral/components/UnunitedCom.tsx index 2961506..7dd42e2 100644 --- a/src/views/Referral/components/UnunitedCom.tsx +++ b/src/views/Referral/components/UnunitedCom.tsx @@ -32,9 +32,9 @@ const UnunitedCom: React.FC = () => { - {t('each time')} + {/* {t('each time')} {t('last bid')} - {t('commission fee')} + {t('commission fee')} */} ) diff --git a/src/views/Referral/index.tsx b/src/views/Referral/index.tsx index 66a90d8..1eec00b 100644 --- a/src/views/Referral/index.tsx +++ b/src/views/Referral/index.tsx @@ -40,8 +40,8 @@ const Nft: React.FC = () => { const dispatch = useDispatch() const account = useAccount() - // const referralIsCommander = useReferralIsCommander() - const referralIsCommander = false + const referralIsCommander = useReferralIsCommander() + // const referralIsCommander = false console.log('referralIsCommander:', referralIsCommander) useEffect(() => { dispatch(fetchReferralInfoAsync(account))