From bc6654646f0bd2dbf93c2e7dd7d3017f30e2b08b Mon Sep 17 00:00:00 2001 From: Maikoeliud Date: Wed, 1 Feb 2023 20:26:31 +0300 Subject: [PATCH] Fix: used utils time conversion --- src/components/OverviewSingleAssetTab.tsx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/components/OverviewSingleAssetTab.tsx b/src/components/OverviewSingleAssetTab.tsx index 81c9107..ff3e383 100644 --- a/src/components/OverviewSingleAssetTab.tsx +++ b/src/components/OverviewSingleAssetTab.tsx @@ -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' @@ -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() @@ -73,9 +73,7 @@ const OverviewSingleAssetTab = () => { Last verified - {!isLoading && lastVerified - ? moment(moment.unix(lastVerified).utc().format('DD MMM YYYY HH:mm:ss [UTC]')).fromNow() - : 'loading...'} + {!isLoading && lastVerified ? formatTimeLeft(lastVerified) : 'loading...'}