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:
padreug 2025-08-02 17:53:26 +02:00
parent e66d976ee8
commit 1a3510becb
2 changed files with 3 additions and 1 deletions

View file

@ -24,6 +24,7 @@ export function useMarket() {
const loadMarket = async (naddr: string) => {
try {
isLoading.value = true
marketStore.setLoading(true)
error.value = null
console.log('Loading market with naddr:', naddr)
@ -45,6 +46,7 @@ export function useMarket() {
// Don't throw error, let the UI handle it gracefully
} finally {
isLoading.value = false
marketStore.setLoading(false)
}
}