Skip to content

Commit

Permalink
Display date/time instead of relative time since
Browse files Browse the repository at this point in the history
  • Loading branch information
SatsAllDay committed Oct 25, 2023
1 parent fb8efb0 commit 07939ca
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pages/satistics.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import { CommentFlat } from '../components/comment'
import ItemJob from '../components/item-job'
import PageLoading from '../components/page-loading'
import PayerData from '../components/payer-data'
import { timeSince } from '../lib/time'

export const getServerSideProps = getGetServerSideProps({ query: WALLET_HISTORY, authRequired: true })

Expand Down Expand Up @@ -138,12 +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' title={fact.createdAt} suppressHydrationWarning>{timeSince(new Date(fact.createdAt))}</div>
<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>
</>
Expand Down

0 comments on commit 07939ca

Please sign in to comment.