Merge pull request #276 from blockworks-foundation/add-seconds-trade-history

add seconds to trade history
This commit is contained in:
tjshipe 2022-05-18 16:36:13 -04:00 committed by GitHub
commit 5284b4988e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 2 deletions

View File

@ -99,9 +99,17 @@ export const Row = ({ children }: RowProps) => {
)
}
export const TableDateDisplay = ({ date }: { date: string | number }) => (
export const TableDateDisplay = ({
date,
showSeconds,
}: {
date: string | number
showSeconds?: boolean
}) => (
<>
<p className="mb-0 text-th-fgd-2">{dayjs(date).format('DD MMM YYYY')}</p>
<p className="mb-0 text-xs">{dayjs(date).format('h:mma')}</p>
<p className="mb-0 text-xs">
{dayjs(date).format(showSeconds ? 'h:mm:ssa' : 'h:mma')}
</p>
</>
)

View File

@ -451,6 +451,7 @@ const TradeHistoryTable = ({
date={formatTradeDateTime(
trade.loadTimestamp || trade.timestamp
)}
showSeconds
/>
) : (
t('recent')
@ -508,6 +509,7 @@ const TradeHistoryTable = ({
date={formatTradeDateTime(
trade.loadTimestamp || trade.timestamp
)}
showSeconds
/>
) : (
t('recent')