Skip to content

Commit b8a8484

Browse files
committed
Use state constants
1 parent 32f605e commit b8a8484

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

client/src/components/Dataset/DatasetView.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import { useDatatypesMapperStore } from "@/stores/datatypesMapperStore";
1010
import { useDatatypeStore } from "@/stores/datatypeStore";
1111
import { withPrefix } from "@/utils/redirect";
1212
import { bytesToString } from "@/utils/utils";
13+
import STATES from "@/utils/datasetStates";
1314
1415
import DatasetError from "../DatasetInformation/DatasetError.vue";
1516
import LoadingSpan from "../LoadingSpan.vue";
@@ -81,9 +82,9 @@ const preferredVisualization = computed(
8182
8283
// Match dataset state
8384
const showError = computed(
84-
() => dataset.value && (dataset.value.state === "error" || dataset.value.state === "failed_metadata"),
85+
() => dataset.value && STATES.ERROR_STATES.includes(dataset.value.state),
8586
);
86-
const showOk = computed(() => dataset.value && dataset.value.state === "ok");
87+
const showOk = computed(() => dataset.value && dataset.value.state === STATES.OK);
8788
8889
// Watch for changes to the dataset to fetch datatype info
8990
watch(

0 commit comments

Comments
 (0)