Skip to content

Commit 1d43994

Browse files
committed
chore: immediate status service
1 parent 4c7da16 commit 1d43994

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

components/service/base/Index.vue

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,12 @@ import type { BaseService } from '~/types'
3131
import { useServiceData } from '~/composables/services'
3232
3333
const props = defineProps<BaseService>()
34-
const { data, pauseUpdate } = useServiceData<BaseService, { ping: { time: number, status: boolean } }>(props)
34+
35+
// Right now, queries for "base" are only needed for statuses.
36+
// When the situation will change it is necessary to remove/add condition for "immediate"
37+
const { data, pauseUpdate } = useServiceData<BaseService, { ping: { time: number, status: boolean } }>(props, {
38+
immediate: props.status?.enabled,
39+
})
3540
3641
onBeforeUnmount(pauseUpdate)
3742
</script>

0 commit comments

Comments
 (0)