fix: Improve loading state management in useMarket and Market.vue
- Update useMarket composable to set loading state in marketStore during market loading. - Refine loading condition in Market.vue to only check marketStore.isLoading, enhancing clarity and performance.
This commit is contained in:
parent
e66d976ee8
commit
1a3510becb
2 changed files with 3 additions and 1 deletions
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<div class="container mx-auto px-4 py-8">
|
||||
<!-- Loading State -->
|
||||
<div v-if="marketStore.isLoading || market.isLoading" class="flex justify-center items-center min-h-64">
|
||||
<div v-if="marketStore.isLoading" class="flex justify-center items-center min-h-64">
|
||||
<div class="flex flex-col items-center space-y-4">
|
||||
<div class="animate-spin rounded-full h-12 w-12 border-b-2 border-blue-600"></div>
|
||||
<p class="text-gray-600">Loading market...</p>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue