Skip to content

Commit ac2df1a

Browse files
committed
Fix hydration missmatch error
1 parent 22ce764 commit ac2df1a

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

app/pages/compare.vue

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,10 @@ useSeoMeta({
198198
</h2>
199199

200200
<div
201-
v-if="status === 'pending' && (!packagesData || packagesData.every(p => p === null))"
201+
v-if="
202+
(status === 'pending' || status === 'idle') &&
203+
(!packagesData || packagesData.every(p => p === null))
204+
"
202205
class="flex items-center justify-center py-12"
203206
>
204207
<LoadingSpinner :text="$t('compare.packages.loading')" />
@@ -247,9 +250,12 @@ useSeoMeta({
247250
<CompareLineChart :packages="packages.filter(p => p !== NO_DEPENDENCY_ID)" />
248251
</div>
249252

250-
<div v-else class="text-center py-12" role="alert">
253+
<div v-else-if="status === 'error'" class="text-center py-12" role="alert">
251254
<p class="text-fg-muted">{{ $t('compare.packages.error') }}</p>
252255
</div>
256+
<div v-else class="flex items-center justify-center py-12">
257+
<LoadingSpinner :text="$t('compare.packages.loading')" />
258+
</div>
253259
</section>
254260

255261
<!-- Empty state -->

0 commit comments

Comments
 (0)