Skip to content

Commit 500a021

Browse files
committed
Apply CR fixes
1 parent f98a5f2 commit 500a021

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

app/components/Package/WeeklyDownloadStats.vue

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,6 @@ const chartModal = useModal('chart-modal')
1212
const hasChartModalTransitioned = shallowRef(false)
1313
const 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-
2615
function handleModalClose() {
2716
isChartModalOpen.value = false
2817
hasChartModalTransitioned.value = false
@@ -98,9 +87,20 @@ const pulseColor = computed(() => {
9887
})
9988
10089
const weeklyDownloads = shallowRef<WeeklyDownloadPoint[]>([])
101-
const isLoadingWeeklyDownloads = shallowRef(false)
90+
const isLoadingWeeklyDownloads = shallowRef(true)
10291
const 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+
104104
async function loadWeeklyDownloads() {
105105
if (!import.meta.client) return
106106

0 commit comments

Comments
 (0)