Fix an error when logging out was causing state issues

This commit is contained in:
Jonathan Bourdon
2024-08-05 13:17:22 -04:00
parent 9cbf63339a
commit 3a98b38a71
5 changed files with 12 additions and 11 deletions

View File

@@ -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 {

View File

@@ -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>