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 211eac5 commit 1e32b09
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, TableCell, TableContainer, TableRow, Tooltip, Typography } from '@mui/material'
import { styled } from '@mui/system'
Expand All @@ -12,6 +11,7 @@ import { useDataSetAssetsContext } from '../hooks/useDatachainOutput'

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

const TableNameCell = styled(TableCell)(({ theme }) => ({
width: '266px',
Expand Down Expand Up @@ -99,9 +99,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 1e32b09

Please sign in to comment.