Simplify ContentList
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user