Fix an error when logging out was causing state issues
This commit is contained in:
@@ -45,16 +45,15 @@ const creatorIdWatcher = watch(
|
||||
(newCreatorId) => {
|
||||
if (newCreatorId) {
|
||||
// Reset contents and last_id when the creatorId changes
|
||||
contents.value = [];
|
||||
last_id = null;
|
||||
contents.value = []
|
||||
last_id = null
|
||||
// Fetch contents for the new creator
|
||||
fetchContents({
|
||||
done: () => {
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
{immediate: true})
|
||||
})
|
||||
|
||||
async function fetchContents({done}) {
|
||||
try {
|
||||
|
||||
@@ -61,7 +61,7 @@ const closeDialog = () => {
|
||||
<template>
|
||||
|
||||
<button
|
||||
v-if="creator.id === userStore.user.id"
|
||||
v-if="creator && userStore.user && creator.id === userStore.user.id"
|
||||
class="flex items-center text-white transform transition-transform duration-200 hover:text-gray-300 hover:scale-125 px-4"
|
||||
@click="isDialogActive = true">
|
||||
<v-icon style="font-size: 35px; height: 35px; width: 55px;">mdi-text-box-plus-outline</v-icon>
|
||||
Reference in New Issue
Block a user