Skip to content

Commit 3c71ac4

Browse files
committed
Apply CR fixes
1 parent 5ca9bc7 commit 3c71ac4

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

app/components/Package/WeeklyDownloadStats.vue

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,6 @@ const props = defineProps<{
1111
const chartModal = useModal('chart-modal')
1212
1313
const isChartModalOpen = shallowRef(false)
14-
async function openChartModal() {
15-
if (!hasWeeklyDownloads.value) return
16-
17-
isChartModalOpen.value = true
18-
// ensure the component renders before opening the dialog
19-
await nextTick()
20-
await nextTick()
21-
chartModal.open()
22-
}
2314
2415
const { fetchPackageDownloadEvolution } = useCharts()
2516
@@ -87,9 +78,19 @@ const pulseColor = computed(() => {
8778
})
8879
8980
const weeklyDownloads = shallowRef<WeeklyDownloadPoint[]>([])
90-
const isLoadingWeeklyDownloads = shallowRef(false)
81+
const isLoadingWeeklyDownloads = shallowRef(true)
9182
const hasWeeklyDownloads = computed(() => weeklyDownloads.value.length > 0)
9283
84+
async function openChartModal() {
85+
if (!hasWeeklyDownloads.value) return
86+
87+
isChartModalOpen.value = true
88+
// ensure the component renders before opening the dialog
89+
await nextTick()
90+
await nextTick()
91+
chartModal.open()
92+
}
93+
9394
async function loadWeeklyDownloads() {
9495
if (!import.meta.client) return
9596

0 commit comments

Comments
 (0)