diff --git a/src/app/components/NFTPreview/index.tsx b/src/app/components/NFTPreview/index.tsx index 48a29532b..0508424e3 100644 --- a/src/app/components/NFTPreview/index.tsx +++ b/src/app/components/NFTPreview/index.tsx @@ -286,7 +286,9 @@ export const NFTPreview = React.memo(

{t(translations.nftChecker.owner)}:{' '} - {formatString(owner, 'address')} + + {formatString(owner, 'address')} + {' '} )} diff --git a/src/app/containers/Charts/index.tsx b/src/app/containers/Charts/index.tsx index a74ecd55f..147d43e4b 100644 --- a/src/app/containers/Charts/index.tsx +++ b/src/app/containers/Charts/index.tsx @@ -23,12 +23,16 @@ import { Contracts } from './Contracts'; export function NewChart() { const { t, i18n } = useTranslation(); const iszh = i18n.language.includes('zh'); - dayjs.locale(i18n.language.toLowerCase() as 'zh-cn' | 'en'); const format = iszh ? 'YYYY MMMDD' : 'DD MMM YYYY'; const current = dayjs().subtract(1, 'day'); const oneMonthBefore = current.subtract(30, 'day'); + if (localStorage.getItem('test')) { + console.log(iszh, format); + console.log(oneMonthBefore.format(format), current.format(format)); + } + return ( diff --git a/src/app/containers/Footer/Language.tsx b/src/app/containers/Footer/Language.tsx index 328c7bdb2..4757f72a3 100644 --- a/src/app/containers/Footer/Language.tsx +++ b/src/app/containers/Footer/Language.tsx @@ -5,7 +5,6 @@ import styled from 'styled-components/macro'; import Globe from '@zeit-ui/react-icons/globe'; import { trackEvent } from '../../../utils/ga'; import { ScanEvent } from '../../../utils/gaConstants'; -import dayjs from 'dayjs'; export function Language() { const { i18n } = useTranslation(); @@ -19,7 +18,6 @@ export function Language() { label: 'en', }); i18n.changeLanguage('en'); - dayjs.locale('en'); } else { trackEvent({ category: ScanEvent.preference.category, @@ -27,7 +25,6 @@ export function Language() { label: 'zh-CN', }); i18n.changeLanguage('zh-CN'); - dayjs.locale('zh-cn'); } }; const options = [ diff --git a/src/app/containers/Header/index.tsx b/src/app/containers/Header/index.tsx index b9f8cf225..0e83115d7 100644 --- a/src/app/containers/Header/index.tsx +++ b/src/app/containers/Header/index.tsx @@ -23,7 +23,6 @@ import { useGlobalData, GlobalDataType } from 'utils/hooks/useGlobal'; import { getNetwork, gotoNetwork } from 'utils'; import { NETWORK_TYPE, NETWORK_TYPES } from 'utils/constants'; import { Notices } from 'app/containers/Notices/Loadable'; -import dayjs from 'dayjs'; import logo from 'images/logo.svg'; import logoTest from 'images/logo-test.svg'; @@ -566,7 +565,6 @@ export const Header = memo(() => { menuClick(); if (iszh) { i18n.changeLanguage('en'); - dayjs.locale('en'); } }, isMatchedFn: () => !iszh, @@ -583,7 +581,6 @@ export const Header = memo(() => { menuClick(); if (!iszh) { i18n.changeLanguage('zh-CN'); - dayjs.locale('zh-cn'); } }, isMatchedFn: () => iszh, diff --git a/src/app/containers/NFTDetail/TransferModal.tsx b/src/app/containers/NFTDetail/TransferModal.tsx index d4fe6b7a8..0aba83fe1 100644 --- a/src/app/containers/NFTDetail/TransferModal.tsx +++ b/src/app/containers/NFTDetail/TransferModal.tsx @@ -300,6 +300,7 @@ export const TransferModal = ({ min={1} max={NFT1155Quantity} style={{ width: '100%' }} + precision={0} /> )} diff --git a/src/app/containers/NFTDetail/index.tsx b/src/app/containers/NFTDetail/index.tsx index e63b8316f..339029fcd 100644 --- a/src/app/containers/NFTDetail/index.tsx +++ b/src/app/containers/NFTDetail/index.tsx @@ -137,6 +137,22 @@ export function NFTDetail(props) { )} + {tokenType?.includes('721') && ( + + + {data.owner ? ( + <> + + {data.owner} + {' '} + + + ) : ( + '--' + )} + + + )} {tokenType ? tokenType : '--'} diff --git a/src/locales/zh_cn/translation.json b/src/locales/zh_cn/translation.json index cda55f57d..28cfb33fb 100644 --- a/src/locales/zh_cn/translation.json +++ b/src/locales/zh_cn/translation.json @@ -1650,7 +1650,7 @@ "tokenId": "代币 ID", "plzSearch": "请搜索", "plzSearchDesc": "请在上方输入地址以查看其拥有的 NFT", - "owner": "所有人", + "owner": "持有人", "amount": "NFT 数量" }, "pos": {