Skip to content

Commit

Permalink
Fix: used utils time conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
Maikoeliud committed Feb 1, 2023
1 parent cfb3899 commit bc66546
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/components/OverviewSingleAssetTab.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import React from 'react'
import { Link as RouterLink, useParams } from 'react-router-dom'
import moment from 'moment'

import { Box, Link, Table, TableBody, TableContainer, TableRow, Tooltip, Typography } from '@mui/material'

Expand All @@ -13,6 +12,7 @@ import { useDataSetAssetsContext } from '../hooks/useDatachainOutput'

import { getVerificationComponent } from './Verifications'
import Issuer from './Issuer'
import { formatTimeLeft } from '../utils/timestapFormater'

const OverviewSingleAssetTab = () => {
const { assetContract, assetTokenId, assetSerial, id } = useParams()
Expand Down Expand Up @@ -73,9 +73,7 @@ const OverviewSingleAssetTab = () => {
<TableRow sx={{ backgroundColor: 'grey.50' }}>
<TableNameCell>Last verified</TableNameCell>
<TableValueCell>
{!isLoading && lastVerified
? moment(moment.unix(lastVerified).utc().format('DD MMM YYYY HH:mm:ss [UTC]')).fromNow()
: 'loading...'}
{!isLoading && lastVerified ? formatTimeLeft(lastVerified) : 'loading...'}
</TableValueCell>
</TableRow>

Expand Down

0 comments on commit bc66546

Please sign in to comment.