File tree Expand file tree Collapse file tree 1 file changed +12
-12
lines changed
Expand file tree Collapse file tree 1 file changed +12
-12
lines changed Original file line number Diff line number Diff line change @@ -12,17 +12,6 @@ const chartModal = useModal('chart-modal')
1212const hasChartModalTransitioned = shallowRef (false )
1313const isChartModalOpen = shallowRef (false )
1414
15- async function openChartModal() {
16- if (! hasWeeklyDownloads .value ) return
17-
18- isChartModalOpen .value = true
19- hasChartModalTransitioned .value = false
20- // ensure the component renders before opening the dialog
21- await nextTick ()
22- await nextTick ()
23- chartModal .open ()
24- }
25-
2615function handleModalClose() {
2716 isChartModalOpen .value = false
2817 hasChartModalTransitioned .value = false
@@ -98,9 +87,20 @@ const pulseColor = computed(() => {
9887})
9988
10089const weeklyDownloads = shallowRef <WeeklyDownloadPoint []>([])
101- const isLoadingWeeklyDownloads = shallowRef (false )
90+ const isLoadingWeeklyDownloads = shallowRef (true )
10291const hasWeeklyDownloads = computed (() => weeklyDownloads .value .length > 0 )
10392
93+ async function openChartModal() {
94+ if (! hasWeeklyDownloads .value ) return
95+
96+ isChartModalOpen .value = true
97+ hasChartModalTransitioned .value = false
98+ // ensure the component renders before opening the dialog
99+ await nextTick ()
100+ await nextTick ()
101+ chartModal .open ()
102+ }
103+
104104async function loadWeeklyDownloads() {
105105 if (! import .meta .client ) return
106106
You can’t perform that action at this time.
0 commit comments