Wallet history timestamps (#585)
* Show when wallet history facts occurred make use of the `timeSince` function that we use in item components to show a relative time that a wallet history event occurred. you an also hover over the relative time to see the ISO timestamp. * Add `suppressHydrationWarning` to avoid hydration issues in dev mode * Display date/time instead of relative time since
This commit is contained in:
parent
64cf40a04c
commit
843774183b
|
@ -137,11 +137,13 @@ function Detail ({ fact }) {
|
|||
}
|
||||
|
||||
function Fact ({ fact }) {
|
||||
const factDate = new Date(fact.createdAt)
|
||||
return (
|
||||
<>
|
||||
<div className={`${styles.type} ${satusClass(fact.status)} ${fact.sats > 0 ? '' : 'text-muted'}`}>{fact.type}</div>
|
||||
<div className={styles.detail}>
|
||||
<Detail fact={fact} />
|
||||
<div className='text-muted px-3'>{`${factDate.toLocaleDateString()} ${factDate.toLocaleTimeString()}`}</div>
|
||||
</div>
|
||||
<div className={`${styles.sats} ${satusClass(fact.status)} ${fact.sats > 0 ? '' : 'text-muted'}`}>{fact.sats}</div>
|
||||
</>
|
||||
|
|
Loading…
Reference in New Issue