style: fix linting issues met Prettier
This commit is contained in:
parent
ed8b5c919d
commit
ea5cf7abf9
26 changed files with 467 additions and 422 deletions
|
@ -1,24 +1,27 @@
|
|||
<script setup lang="ts" generic="T">
|
||||
import {computed} from "vue";
|
||||
import {useI18n} from "vue-i18n";
|
||||
import type {UseQueryReturnType} from "@tanstack/vue-query";
|
||||
import { computed } from "vue";
|
||||
import { useI18n } from "vue-i18n";
|
||||
import type { UseQueryReturnType } from "@tanstack/vue-query";
|
||||
|
||||
const props = defineProps<{
|
||||
queryResult: UseQueryReturnType<T, Error>
|
||||
}>()
|
||||
queryResult: UseQueryReturnType<T, Error>;
|
||||
}>();
|
||||
|
||||
const { isLoading, isError, isSuccess, data, error } = props.queryResult;
|
||||
|
||||
const { t } = useI18n();
|
||||
|
||||
const errorMessage = computed(() => {
|
||||
const errorWithMessage = (error.value as {message: string}) || null;
|
||||
return errorWithMessage?.message || JSON.stringify(errorWithMessage)
|
||||
const errorWithMessage = (error.value as { message: string }) || null;
|
||||
return errorWithMessage?.message || JSON.stringify(errorWithMessage);
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="loading-div" v-if="isLoading">
|
||||
<div
|
||||
class="loading-div"
|
||||
v-if="isLoading"
|
||||
>
|
||||
<v-progress-circular indeterminate></v-progress-circular>
|
||||
</div>
|
||||
<div v-if="isError">
|
||||
|
@ -28,12 +31,15 @@
|
|||
:title="t('error_title')"
|
||||
></v-empty-state>
|
||||
</div>
|
||||
<slot v-if="isSuccess && data" :data="data"></slot>
|
||||
<slot
|
||||
v-if="isSuccess && data"
|
||||
:data="data"
|
||||
></slot>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.loading-div {
|
||||
padding: 20px;
|
||||
text-align: center;
|
||||
}
|
||||
.loading-div {
|
||||
padding: 20px;
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue