Skip to content

Commit

Permalink
fix: address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
filipgutica committed Nov 19, 2024
1 parent bf83de2 commit 3490453
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ export default function useMetricFetcher(opts: MetricFetcherOptions): FetcherRes
})

return {
isLoading: computed(() => metricRequestState.value === STATE.PENDING || [STATE.PENDING, STATE.VALIDATING, STATE.VALIDATING_HAS_DATA].includes(metricRequestState.value)),
isLoading: computed(() => [STATE.PENDING, STATE.VALIDATING, STATE.VALIDATING_HAS_DATA].includes(metricRequestState.value)),
hasError: computed(() => STATE.ERROR === metricRequestState.value),
raw,
mapped,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,6 @@ const { state, swrvState: STATE } = useSwrvState(v4Data, error, isValidating)
const errorMessage = ref<string | null>(null)
const hasError = computed(() => state.value === STATE.ERROR || !!errorMessage.value)
const isLoading = computed(() => !props.queryReady || state.value === STATE.PENDING || state.value === STATE.VALIDATING_HAS_DATA || state.value === STATE.VALIDATING)
const isLoading = computed(() => !props.queryReady || [STATE.PENDING, STATE.VALIDATING, STATE.VALIDATING_HAS_DATA].includes(state.value))
</script>

0 comments on commit 3490453

Please sign in to comment.