Skip to content

Commit

Permalink
revise marketTime in collectible detail
Browse files Browse the repository at this point in the history
  • Loading branch information
fullstack12345 committed May 15, 2022
1 parent 02732f7 commit e35afa9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/components/marketplace/AssetDetailInfo.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { marketContract } from '../../config'

const DETAILINFO_ICONS = ['hash', 'cash-hand', 'basket', 'tag', 'calendar-hammer', 'calendar-market', 'qricon']
const DETAILINFO_TITLE = ['Token ID', 'Royalties', 'Quantity', 'Sale Type', 'Created Date', 'Date on Market', 'Item Type']
const DETAILINFO_KEYS = ['tokenIdHex', 'royalties', 'quantity', 'SaleType', 'createTime', 'dateOnMarket', 'type']
const DETAILINFO_KEYS = ['tokenIdHex', 'royalties', 'quantity', 'SaleType', 'createTime', 'marketTime', 'type']

const RootStyle = styled('div')(({ theme }) => ({
position: 'relative',
Expand Down Expand Up @@ -73,6 +73,7 @@ export default function AssetDetailInfo({ detail }) {
'key': DETAILINFO_KEYS[index],
}))
const creatimestamp = getTime(detail.createTime)
const marketimestamp = getTime(detail.marketTime)
let dateOnMarket = detail.DateOnMarket
if(dateOnMarket!=='Not on sale'){
const timestamp = getTime(dateOnMarket)
Expand All @@ -83,6 +84,7 @@ export default function AssetDetailInfo({ detail }) {
...detail,
'royalties': `${detail.royalties*100/10**6} %`,
'createTime': `${creatimestamp.date} ${creatimestamp.time}`,
'marketTime': `${marketimestamp.date} ${marketimestamp.time}`,
'dateOnMarket': dateOnMarket,
'holder': detail.holder===marketContract?detail.royaltyOwner:detail.holder
}
Expand Down

1 comment on commit e35afa9

@vercel
Copy link

@vercel vercel bot commented on e35afa9 May 15, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.