From 91807a2e3efb9c25728b12cf2f69835759824da5 Mon Sep 17 00:00:00 2001 From: gary <1032230992@qq.com> Date: Mon, 9 May 2022 11:24:20 +0800 Subject: [PATCH 1/2] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=E5=BA=93=E5=A4=9A=E8=AF=AD=E8=A8=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/locales/zh-CN.json | 3 +- src/App.tsx | 92 ++++++++++++++++++++------------------- 2 files changed, 50 insertions(+), 45 deletions(-) diff --git a/public/locales/zh-CN.json b/public/locales/zh-CN.json index 99af725..933acbc 100644 --- a/public/locales/zh-CN.json +++ b/public/locales/zh-CN.json @@ -1125,5 +1125,6 @@ "possess LP": "持有LP", "capital pool": "资金池", "Unclaimed income": "待领取收益", - "pledge": "质押" + "pledge": "质押", + "Invite": "邀请" } diff --git a/src/App.tsx b/src/App.tsx index 43bf629..95fbbef 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,6 +1,6 @@ import React, { lazy, useEffect } from 'react' import { Router, Redirect, Route, Switch } from 'react-router-dom' -import { ResetCSS } from '@pancakeswap/uikit' +import { ResetCSS, ConfigProvider } from '@pancakeswap/uikit' import { useDispatch } from 'react-redux' import BigNumber from 'bignumber.js' import useEagerConnect from 'hooks/useEagerConnect' @@ -10,6 +10,7 @@ import { initAxios } from 'utils/request' import useToast from 'hooks/useToast' import { useAccountEventListener } from 'hooks/useAccountEventListener' import { fetchUserInfo, clearUserInfo } from 'state/actions' +import { useTranslation } from 'contexts/Localization' import { useAccount } from 'state/userInfo/hooks' import GlobalStyle from './style/Global' import Menu from './components/Menu' @@ -70,6 +71,7 @@ const App: React.FC = () => { const dispatch = useDispatch() const toast = useToast() const account = useAccount() + const { t } = useTranslation() useEffect(() => { initAxios(() => { @@ -81,37 +83,38 @@ const App: React.FC = () => { }, [account]) return ( - - - - - }> - - - - - - - - - - - - - - - - - - - - - - - - - - {/* + + + + + + }> + + + + + + + + + + + + + + + + + + + + + + + + + + {/* @@ -146,7 +149,7 @@ const App: React.FC = () => { {/* Using this format because these components use routes injected props. We need to rework them with hooks */} - {/* + {/* @@ -163,8 +166,8 @@ const App: React.FC = () => { */} - {/* Redirect */} - {/* + {/* Redirect */} + {/* @@ -174,15 +177,16 @@ const App: React.FC = () => { */} - {/* 404 */} - - - - - - - - + {/* 404 */} + + + + + + + + + ) } From 2902d9aaa4e4ca110a9ed437a80d9e6121024025 Mon Sep 17 00:00:00 2001 From: gary <1032230992@qq.com> Date: Mon, 9 May 2022 14:05:13 +0800 Subject: [PATCH 2/2] =?UTF-8?q?feat:=20=E4=BF=AE=E5=A4=8Dbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Board/components/BoardCard/BoardCard.tsx | 20 ++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/src/views/Board/components/BoardCard/BoardCard.tsx b/src/views/Board/components/BoardCard/BoardCard.tsx index 62445c2..e4aa3e3 100644 --- a/src/views/Board/components/BoardCard/BoardCard.tsx +++ b/src/views/Board/components/BoardCard/BoardCard.tsx @@ -91,15 +91,17 @@ const BoardCard: React.FC = ({ board, account }) => { return ( -
- - {board.userData?.name === 'Board' ? ( - - ) : ( - '' - )} - -
+ {account && ( +
+ + {board.userData?.name === 'Board' ? ( + + ) : ( + '' + )} + +
+ )} {/*