Skip to content

Commit

Permalink
Merge pull request #78 from pshenmic/feat/home-page-statistics
Browse files Browse the repository at this point in the history
Extend home page stats
  • Loading branch information
pshenmic authored Nov 5, 2023
2 parents 11376a6 + 9b44514 commit 9101713
Showing 1 changed file with 35 additions and 5 deletions.
40 changes: 35 additions & 5 deletions packages/frontend/src/routes/home/home.route.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,17 @@ export async function loader({}) {
function HomeRoute() {
const {status, transactions} = useLoaderData();

const {tenderdashVersion, network, appVersion, p2pVersion, blockVersion, blocksCount} = status
const {
tenderdashVersion,
network,
appVersion,
blocksCount,
blockTimeAverage,
dataContractsCount,
documentsCount,
transfersCount,
txCount
} = status

return (
<Container
Expand Down Expand Up @@ -66,29 +76,49 @@ function HomeRoute() {
<Box>{tenderdashVersion}</Box>
</Flex>

<Flex wrap={'wrap'}>
<Text as={'b'} mr={4}>App Version:</Text>
<Box>{appVersion}</Box>
</Flex>

</Box>

<Box w={['100%', , '33%']}>

<Flex wrap={'wrap'}>
<Text as={'b'} mr={4}>Average block time:</Text>
<Box>{Math.ceil(blockTimeAverage)} sec.</Box>
</Flex>

<Flex wrap={'wrap'}>
<Text as={'b'} mr={4}>Blocks:</Text>
<Box>{blocksCount}</Box>
</Flex>

<Flex wrap={'wrap'}>
<Text as={'b'} mr={4}>Block version:</Text>
<Box>{blockVersion}</Box>
<Text as={'b'} mr={4}>Transactions:</Text>
<Box>{txCount}</Box>
</Flex>

</Box>

<Box w={['100%', , '33%']}>

<Flex wrap={'wrap'}>
<Text as={'b'} mr={4}>App Version:</Text>
<Box>{appVersion}</Box>
<Text as={'b'} mr={4}>Data contracts:</Text>
<Box>{dataContractsCount}</Box>
</Flex>

<Flex wrap={'wrap'}>
<Text as={'b'} mr={4}>Documents:</Text>
<Box>{documentsCount}</Box>
</Flex>

<Flex wrap={'wrap'}>
<Text as={'b'} mr={4}>Transfers:</Text>
<Box>{transfersCount}</Box>
</Flex>

</Box>

</Stack>
Expand Down

0 comments on commit 9101713

Please sign in to comment.