Skip to content

Commit

Permalink
Merge pull request #667 from alephium/xplr-remove-min
Browse files Browse the repository at this point in the history
Show avg. block time in seconds
  • Loading branch information
nop33 authored Jun 14, 2024
2 parents 1bf3823 + 7aeb1da commit 712b76e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/purple-cougars-change.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@alephium/explorer": patch
---

Show avg. block time in seconds
3 changes: 2 additions & 1 deletion apps/explorer/src/pages/HomePage/HomePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import { explorer } from '@alephium/web3'
import dayjs from 'dayjs'
import duration from 'dayjs/plugin/duration'
import { AnimatePresence } from 'framer-motion'
import { round } from 'lodash'
import { useState } from 'react'
import { useTranslation } from 'react-i18next'
import { usePageVisibility } from 'react-page-visibility'
Expand Down Expand Up @@ -185,7 +186,7 @@ const HomePage = () => {
</Card>
<Card label={t('Avg. block time')} isLoading={avgBlockTime.isLoading}>
<StatisticTextual
primary={avgBlockTime.value ? dayjs.duration(avgBlockTime.value).format('m[m] s[s]') : '-'}
primary={avgBlockTime.value ? `${round(avgBlockTime.value / 1000, 1)}s` : '-'}
secondary={t('of all shards')}
/>
</Card>
Expand Down

0 comments on commit 712b76e

Please sign in to comment.