mirror of
https://github.com/oceanprotocol/market.git
synced 2024-12-02 05:57:29 +01:00
fix Time when date is null
Signed-off-by: mihaisc <mihai.scarlat@smartcontrol.ro>
This commit is contained in:
parent
ce6872d0bd
commit
034111b62d
@ -13,7 +13,9 @@ export default function Time({
|
|||||||
const dateNew = isUnix ? new Date(Number(date) * 1000) : new Date(date)
|
const dateNew = isUnix ? new Date(Number(date) * 1000) : new Date(date)
|
||||||
const dateIso = dateNew.toISOString()
|
const dateIso = dateNew.toISOString()
|
||||||
|
|
||||||
return (
|
return !date ? (
|
||||||
|
<></>
|
||||||
|
) : (
|
||||||
<time
|
<time
|
||||||
title={relative ? format(dateNew, 'MMMM d, yyyy') : undefined}
|
title={relative ? format(dateNew, 'MMMM d, yyyy') : undefined}
|
||||||
dateTime={dateIso}
|
dateTime={dateIso}
|
||||||
|
Loading…
Reference in New Issue
Block a user