调整代码

This commit is contained in:
myf 2022-05-09 09:39:31 +08:00
parent 6b965eef3c
commit 3915cca9df
5 changed files with 33 additions and 29 deletions

BIN
build.zip Normal file

Binary file not shown.

View File

@ -1126,5 +1126,6 @@
"possess LP": "持有LP", "possess LP": "持有LP",
"capital pool": "资金池", "capital pool": "资金池",
"Unclaimed income": "待领取收益", "Unclaimed income": "待领取收益",
"pledge": "质押" "pledge": "质押",
"top": "置顶"
} }

View File

@ -30,34 +30,34 @@ export const ZHCN: Language = { locale: 'zh-CN', language: '简体中文', code:
export const ZHTW: Language = { locale: 'zh-TW', language: '繁體中文', code: 'zh-tw' } export const ZHTW: Language = { locale: 'zh-TW', language: '繁體中文', code: 'zh-tw' }
export const languages = { export const languages = {
// 'ar-SA': AR, 'ar-SA': AR,
// 'bn-BD': BN, 'bn-BD': BN,
'en-US': EN, 'en-US': EN,
// 'de-DE': DE, 'de-DE': DE,
// 'el-GR': EL, 'el-GR': EL,
// 'es-ES': ESES, 'es-ES': ESES,
// 'fi-FI': FI, 'fi-FI': FI,
// 'fil-PH': FIL, 'fil-PH': FIL,
// 'fr-FR': FR, 'fr-FR': FR,
// 'hi-IN': HI, 'hi-IN': HI,
// 'hu-HU': HU, 'hu-HU': HU,
// 'id-ID': ID, 'id-ID': ID,
// 'it-IT': IT, 'it-IT': IT,
// 'ja-JP': JA, 'ja-JP': JA,
// 'ko-KR': KO, 'ko-KR': KO,
// 'nl-NL': NL, 'nl-NL': NL,
// 'pl-PL': PL, 'pl-PL': PL,
// 'pt-BR': PTBR, 'pt-BR': PTBR,
// 'pt-PT': PTPT, 'pt-PT': PTPT,
// 'ro-RO': RO, 'ro-RO': RO,
// 'ru-RU': RU, 'ru-RU': RU,
// 'sv-SE': SVSE, 'sv-SE': SVSE,
// 'ta-IN': TA, 'ta-IN': TA,
// 'tr-TR': TR, 'tr-TR': TR,
// 'uk-UA': UK, 'uk-UA': UK,
// 'vi-VN': VI, 'vi-VN': VI,
'zh-CN': ZHCN, 'zh-CN': ZHCN,
// 'zh-TW': ZHTW, 'zh-TW': ZHTW,
} }
export const languageList = Object.values(languages) export const languageList = Object.values(languages)

View File

@ -1254,5 +1254,6 @@
"possess LP": "possess LP", "possess LP": "possess LP",
"capital pool": "capital pool", "capital pool": "capital pool",
"Unclaimed income": "Unclaimed income", "Unclaimed income": "Unclaimed income",
"pledge": "pledge" "pledge": "pledge",
"top": "top"
} }

View File

@ -1,5 +1,6 @@
import React, { useState } from 'react' import React, { useState } from 'react'
import styled from 'styled-components' import styled from 'styled-components'
import { useTranslation } from 'contexts/Localization'
import { Text, Flex } from '@pancakeswap/uikit' import { Text, Flex } from '@pancakeswap/uikit'
interface InfoProps { interface InfoProps {
@ -52,13 +53,14 @@ const TextTop = styled(Flex)`
` `
const ListItem: React.FC<InfoProps> = ({ title, content, publishTime, top = false }) => { const ListItem: React.FC<InfoProps> = ({ title, content, publishTime, top = false }) => {
const { t } = useTranslation()
return ( return (
<> <>
<FlexTable> <FlexTable>
<TableInfo> <TableInfo>
<FlexTitle> <FlexTitle>
{title} {title}
{top ? <TextTop></TextTop> : ''} {top ? <TextTop>{t('top')}</TextTop> : ''}
</FlexTitle> </FlexTitle>
<TextInfo>{content}</TextInfo> <TextInfo>{content}</TextInfo>
</TableInfo> </TableInfo>