Skip to content

Commit

Permalink
feat(ui): fetch statistics data Periodically
Browse files Browse the repository at this point in the history
  • Loading branch information
duanyytop committed Jun 4, 2019
1 parent c60e062 commit eaa9844
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions web/src/pages/Home/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,10 @@ export default () => {
const { data } = json as Response<BlockWrapper[]>
setBlocksWrappers(data)
})
fetchStatistics().then(json => {
const { data } = json as Response<StatisticsWrapper>
setStatistics(data.attributes)
})
}, BLOCK_POLLING_TIME)

return () => {
Expand Down

0 comments on commit eaa9844

Please sign in to comment.