2024-05-30 17:56:10 +10:00
|
|
|
<script setup>
|
|
|
|
|
import { storeToRefs } from 'pinia'
|
2024-06-06 13:04:36 +10:00
|
|
|
import { useRequestsStore } from '@/stores/requests'
|
2024-06-04 17:38:13 +10:00
|
|
|
import StorageRequests from '@/components/StorageRequests.vue'
|
2024-05-30 17:56:10 +10:00
|
|
|
import SkeletonLoading from '@/components/SkeletonLoading.vue'
|
2024-06-06 13:04:36 +10:00
|
|
|
import { computed } from 'vue'
|
2024-05-30 17:56:10 +10:00
|
|
|
|
2024-06-06 13:04:36 +10:00
|
|
|
const requestsStore = useRequestsStore()
|
2024-06-14 18:13:35 +10:00
|
|
|
const { loading, requests } = storeToRefs(requestsStore)
|
2024-06-06 13:04:36 +10:00
|
|
|
const isLoading = computed(
|
2024-06-14 18:13:35 +10:00
|
|
|
() => loading.value || !requests.value
|
2024-06-06 13:04:36 +10:00
|
|
|
)
|
2024-05-30 17:56:10 +10:00
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<template>
|
2024-06-04 17:38:13 +10:00
|
|
|
<div>
|
2024-06-06 13:04:36 +10:00
|
|
|
<SkeletonLoading v-if="isLoading" type="text" />
|
2024-05-30 17:56:10 +10:00
|
|
|
<StorageRequests v-else />
|
2024-06-04 17:38:13 +10:00
|
|
|
</div>
|
2024-05-30 17:56:10 +10:00
|
|
|
</template>
|