@@ -13,23 +13,24 @@ import { getSeriesByGroupAndType } from "@/services/constants/stats.js"
1313import { fetchRollups } from " @/services/api/rollup.js"
1414
1515const isLoading = ref (false )
16- const series = computed (() => getSeriesByGroupAndType ( ' Rollups ' ) )
16+ const series = ref ( )
1717
1818const getRollups = async () => {
1919 isLoading .value = true
2020
21- const data = await fetchRollups ({
22- limit: 100 ,
23- })
21+ series .value = getSeriesByGroupAndType (' Rollups' )
2422
25- series .value .data = data
23+ fetchRollups ({ limit: 100 })
24+ .then ((res ) => {
25+ series .value .data = res
26+ })
27+ .finally (() => {
28+ isLoading .value = false
29+ })
2630
27- isLoading .value = false
2831}
2932
30- onBeforeMount (async () => {
31- await getRollups ()
32- })
33+ await getRollups ()
3334 </script >
3435
3536<template >
@@ -38,7 +39,6 @@ onBeforeMount(async () => {
3839 <Flex align =" center" justify =" between" wide :class =" $style.section" >
3940 <Flex align =" center" gap =" 4" >
4041 <Text size =" 16" weight =" 600" color =" primary" justify =" start" >Overview</Text >
41- <!-- <Text size="14" weight="600" color="tertiary">(top 10 rollups)</Text> -->
4242 </Flex >
4343
4444 <Button link =" /rollups" type =" secondary" size =" mini" >
@@ -50,14 +50,13 @@ onBeforeMount(async () => {
5050 <RollupsBubbleChart v-if =" !isLoading" :series =" series" />
5151 </Flex >
5252
53- <Flex align =" center" direction =" column" gap =" 12" wide >
53+ <Flex v-if = " !isLoading " align =" center" direction =" column" gap =" 12" wide >
5454 <Flex align =" center" justify =" between" wide :class =" $style.section" >
5555 <Text size =" 16" weight =" 600" color =" primary" justify =" start" >Top Rollups</Text >
5656 </Flex >
5757
5858 <Flex align =" center" justify =" between" gap =" 16" wide :class =" $style.charts_wrapper" >
5959 <PieChartCard
60- v-if =" !isLoading"
6160 v-for =" s in series"
6261 :series =" s"
6362 :data =" series.data"
0 commit comments