Adds delete and restore for a creator's page

This commit is contained in:
2025-04-15 15:57:40 -04:00
parent 43f37177af
commit adfaaf3595
9 changed files with 187 additions and 39 deletions

View File

@@ -2,7 +2,7 @@
import {useClient} from "@/plugins/api.js";
import {useSessionStorage} from "@vueuse/core";
import {ref, watch} from "vue";
import {useRoute} from "vue-router";
import {useRoute, useRouter} from "vue-router";
export const useBrandingStore = defineStore(
'branding',
@@ -17,6 +17,7 @@ export const useBrandingStore = defineStore(
{writeDefaults: false})
const presentationInfos = ref([])
const router = useRouter()
const route = useRoute()
watch(
() => route.params.creator,
@@ -49,7 +50,7 @@ export const useBrandingStore = defineStore(
const response = await client.get(`/api/creators/@${creatorAlias}`)
return response.data
} catch (error) {
console.error(`Error fetching content: ${error}`)
await router.push('/');
}
}