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] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=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 */} + + + + + + + + + ) }