Simplify ContentList

This commit is contained in:
2024-10-06 01:22:05 -04:00
parent 00be9bf118
commit cfae099da2
2 changed files with 9 additions and 25 deletions

View File

@@ -44,15 +44,11 @@ const props = defineProps({
creatorId: {
type: String,
required: true
},
contents: {
type: Array,
default: () => [],
},
}
});
const client = useClient()
const contents = ref(props.contents)
const contents = ref([])
const errorMessage = ref()
let last_id = null

View File

@@ -1,29 +1,17 @@
<template>
<div v-if="brandingStore.value.loading">
<v-progress-linear indeterminate></v-progress-linear>
</div>
<div v-else>
<div class="w-full h-full pr-4">
<content-list :creator-id="brandingStore.value.id"
:contents="news"
></content-list>
<div class="w-full h-full pr-4">
<div v-if="brandingStore.value.loading">
<v-progress-linear indeterminate></v-progress-linear>
</div>
<div v-else>
<content-list :creator-id="brandingStore.value.id"
></content-list>
</div>
</div>
</template>
<script async setup>
import { ref} from 'vue';
import {useBrandingStore} from "@/stores/brandingStore.js";
import ContentList from "@/views/contents/ContentList.vue";
const brandingStore = useBrandingStore()
const contents = ref([])
function contentPosted(content) {
contents.value.unshift(content)
}
</script>