fix multi-lang
This commit is contained in:
parent
52b1aae95b
commit
6bcf6cf3ad
|
@ -1,2 +1,3 @@
|
||||||
REACT_APP_NAME = CoinWind
|
REACT_APP_NAME = CoinWind
|
||||||
REACT_APP_I18N_ENABLED = true
|
REACT_APP_I18N_ENABLED = true
|
||||||
|
REACT_APP_DEV_ENDPOINT = http://coinwind.test/
|
|
@ -36,20 +36,22 @@ export const AppContextProvider = ({ children }) => {
|
||||||
const [appKey, setAppKey] = React.useState('')
|
const [appKey, setAppKey] = React.useState('')
|
||||||
const [kefuUrl, setKefuUrl] = 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('home'), icon: FiHome, path: '/home', enabled: true },
|
||||||
{ name: t('farm'), icon: FiTrendingUp, path: '/farm', enabled: true },
|
{ name: t('farm'), icon: FiTrendingUp, path: '/farm', enabled: true },
|
||||||
{ name: t('staking'), icon: FiLock, path: '/staking', enabled: true },
|
{ name: t('staking'), icon: FiLock, path: '/staking', enabled: true },
|
||||||
])
|
]
|
||||||
const [docItems, setDocItems] = React.useState([
|
|
||||||
{ name: t('announcement'), icon: '', path: '/ann', enabled: true },
|
const docItems = [
|
||||||
{ name: t('faq'), icon: '', path: '/faq', enabled: true },
|
{ name: t('announcement'), icon: '', path: '', enabled: true },
|
||||||
{ name: t('tutorial'), icon: '', path: '/tut', enabled: true },
|
{ name: t('faq'), icon: '', path: '', enabled: true },
|
||||||
])
|
{ name: t('tutorial'), icon: '', path: '', enabled: true },
|
||||||
|
]
|
||||||
|
|
||||||
React.useEffect(() => {
|
React.useEffect(() => {
|
||||||
console.debug('should be once')
|
console.debug('should be once')
|
||||||
|
|
||||||
|
|
||||||
get_settings().then((res) => {
|
get_settings().then((res) => {
|
||||||
const o = res.data.other
|
const o = res.data.other
|
||||||
const s = res.data.system
|
const s = res.data.system
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
|
|
||||||
const items = {
|
const items = {
|
||||||
development: {
|
development: {
|
||||||
ENDPOINT: 'http://coinwind.local.com/'
|
ENDPOINT: process.env.REACT_APP_DEV_ENDPOINT
|
||||||
},
|
},
|
||||||
production: {
|
production: {
|
||||||
ENDPOINT: 'https://gdb.01a01.com/'
|
ENDPOINT: 'https://gdb.01a01.com/'
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
export const fr = {
|
export const fr = {
|
||||||
home: 'Domicile',
|
home: 'Domicile',
|
||||||
farm: 'Ferme',
|
farm: 'Ferme',
|
||||||
staking: 'Staking',
|
staking: 'Jalonnement',
|
||||||
announcement: 'Annonce',
|
announcement: 'Annonce',
|
||||||
faq: 'FAQ',
|
faq: 'FAQ',
|
||||||
tutorial: 'Didacticiel',
|
tutorial: 'Didacticiel',
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
export const tw = {
|
export const tw = {
|
||||||
home: '首頁',
|
home: '首頁',
|
||||||
farm: '農場',
|
farm: '農場',
|
||||||
staking: 'Staking',
|
staking: '質押',
|
||||||
announcement: '公告',
|
announcement: '公告',
|
||||||
faq: 'FAQ',
|
faq: 'FAQ',
|
||||||
tutorial: '教案',
|
tutorial: '教案',
|
||||||
|
|
Loading…
Reference in New Issue