Adds Content deletion
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
<template v-for="content in contents" :key="content">
|
||||
<content-card :content="content"
|
||||
class="my-1"
|
||||
@content:deleted="onContentDeleted"
|
||||
></content-card>
|
||||
</template>
|
||||
|
||||
@@ -40,6 +41,10 @@ const page_size = 10
|
||||
const errorMessage = ref()
|
||||
let last_id = null
|
||||
|
||||
async function onContentDeleted(contentId) {
|
||||
contents.value = contents.value.filter(c => c.id !== contentId)
|
||||
}
|
||||
|
||||
const creatorIdWatcher = watch(
|
||||
() => props.creatorId,
|
||||
(newCreatorId) => {
|
||||
|
||||
Reference in New Issue
Block a user