From 1e32b0933c75c193293792bc89bd11fa7c553821 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 f63cf68..9d50872 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, TableCell, TableContainer, TableRow, Tooltip, Typography } from '@mui/material' import { styled } from '@mui/system' @@ -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', @@ -99,9 +99,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...'}