Skip to content

Commit

Permalink
fix: Improve transaction stats loading (#683)
Browse files Browse the repository at this point in the history
  • Loading branch information
janmichek authored Mar 20, 2024
1 parent af475f3 commit ee5a6eb
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 11 deletions.
2 changes: 2 additions & 0 deletions src/components/FooterSocials.vue
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,12 @@ const socials = [
grid-template-columns: repeat(4, 30px);
grid-row-gap: var(--space-4);
justify-content: space-between;
min-height: 105px;
@media (--desktop) {
grid-auto-flow: column;
grid-template-columns: revert;
min-height: 40px;
}
&__icon {
Expand Down
1 change: 0 additions & 1 deletion src/components/TheFooter.vue
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ import { storeToRefs } from 'pinia'
import FooterList from '@/components/FooterList'
import AppLink from '@/components/AppLink'
import AppTooltip from '@/components/AppTooltip'
import FooterSocials from '@/components/FooterSocials'
import { useStatus } from '@/stores/status'
const { middlewareVersion, nodeVersion } = storeToRefs(useStatus())
Expand Down
5 changes: 2 additions & 3 deletions src/components/TransactionsChartPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,9 @@ const { fetchTransactionsStatistics } = transactionsStore
const selectedInterval = ref('')
await useAsyncData(async() => {
if (process.client) {
await fetchTransactionsStatistics()
return true
})
}
async function loadTransactionsStatistics({ interval, limit, range }) {
selectedInterval.value = interval
Expand Down
6 changes: 4 additions & 2 deletions src/components/TransactionsStatistics.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,10 @@ const { fetchLast24hsTransactionsCount } = useTransactionsStore()
const { transactionsCount } = storeToRefs(useBlockchainStatsStore())
const { last24hsTransactionsCount, last24hsTransactionsTrend } = storeToRefs(useTransactionsStore())
await fetchTotalTransactionsCount()
await fetchLast24hsTransactionsCount()
if (process.client) {
await fetchTotalTransactionsCount()
await fetchLast24hsTransactionsCount()
}
const chipVariant = computed(() => last24hsTransactionsTrend.value > 0 ? 'success' : 'error')
Expand Down
6 changes: 1 addition & 5 deletions src/pages/transactions/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</template>
</page-header>
<template v-if="!isLoading">
<transactions-stats class="transactions__transactions-stats"/>
<transactions-stats class="transactions-panel"/>
<transactions-chart-panel class="transactions-panel"/>
<transactions-panel class="transactions-panel"/>
</template>
Expand All @@ -34,9 +34,5 @@ const { isLoading } = useLoading()
&:last-child {
margin-bottom: 0;
}
&__transactions-stats {
margin-bottom: var(--space-2);
}
}
</style>

0 comments on commit ee5a6eb

Please sign in to comment.