fix multi-lang

This commit is contained in:
john 2022-05-12 16:06:08 +07:00
parent 52b1aae95b
commit 6bcf6cf3ad
5 changed files with 14 additions and 11 deletions

View File

@ -1,2 +1,3 @@
REACT_APP_NAME = CoinWind
REACT_APP_I18N_ENABLED = true
REACT_APP_DEV_ENDPOINT = http://coinwind.test/

View File

@ -36,20 +36,22 @@ export const AppContextProvider = ({ children }) => {
const [appKey, setAppKey] = React.useState('')
const [kefuUrl, setKefuUrl] = React.useState('')
const [menuItems, setMenuItems] = React.useState([
const menuItems = [
{ name: t('home'), icon: FiHome, path: '/home', enabled: true },
{ name: t('farm'), icon: FiTrendingUp, path: '/farm', enabled: true },
{ name: t('staking'), icon: FiLock, path: '/staking', enabled: true },
])
const [docItems, setDocItems] = React.useState([
{ name: t('announcement'), icon: '', path: '/ann', enabled: true },
{ name: t('faq'), icon: '', path: '/faq', enabled: true },
{ name: t('tutorial'), icon: '', path: '/tut', enabled: true },
])
]
const docItems = [
{ name: t('announcement'), icon: '', path: '', enabled: true },
{ name: t('faq'), icon: '', path: '', enabled: true },
{ name: t('tutorial'), icon: '', path: '', enabled: true },
]
React.useEffect(() => {
console.debug('should be once')
get_settings().then((res) => {
const o = res.data.other
const s = res.data.system

View File

@ -1,7 +1,7 @@
const items = {
development: {
ENDPOINT: 'http://coinwind.local.com/'
ENDPOINT: process.env.REACT_APP_DEV_ENDPOINT
},
production: {
ENDPOINT: 'https://gdb.01a01.com/'

View File

@ -2,7 +2,7 @@
export const fr = {
home: 'Domicile',
farm: 'Ferme',
staking: 'Staking',
staking: 'Jalonnement',
announcement: 'Annonce',
faq: 'FAQ',
tutorial: 'Didacticiel',

View File

@ -2,7 +2,7 @@
export const tw = {
home: '首頁',
farm: '農場',
staking: 'Staking',
staking: '質押',
announcement: '公告',
faq: 'FAQ',
tutorial: '教案',