diff --git a/frontend/src/stores/brandingStore.js b/frontend/src/stores/brandingStore.js
index 7f51705..eecbee3 100644
--- a/frontend/src/stores/brandingStore.js
+++ b/frontend/src/stores/brandingStore.js
@@ -1,8 +1,7 @@
import {defineStore} from 'pinia'
import {useClient} from "@/plugins/api.js";
import {useSessionStorage} from "@vueuse/core";
-import {ref, watch} from "vue";
-import {useRoute} from "vue-router";
+import {ref} from "vue";
export const useBrandingStore = defineStore(
'branding',
@@ -16,29 +15,25 @@ export const useBrandingStore = defineStore(
{},
{writeDefaults: false})
- const presentationInfos = ref([])
+ const presentationInfos = ref([])
- const route = useRoute()
- watch(
- () => route.params.creator,
- async (newCreator, oldCreator) => {
- loading.value = true
+ async function updateBrand(newBrand) {
+ loading.value = true
- if (newCreator !== oldCreator) {
- if (newCreator !== undefined) {
- value.value = await fetchCreatorData(newCreator)
- currentBrand.value = newCreator
- presentationInfos.value = value.value?.presentationInfos
- } else {
- value.value = {}
- currentBrand.value = undefined
- presentationInfos.value = []
- }
+ if (newBrand !== currentBrand.value) {
+ if (newBrand !== undefined) {
+ value.value = await fetchCreatorData(newBrand)
+ currentBrand.value = newBrand
+ presentationInfos.value = value.value?.presentationInfos
+ } else {
+ value.value = {}
+ currentBrand.value = undefined
+ presentationInfos.value = []
}
-
- loading.value = false
}
- )
+
+ loading.value = false
+ }
const fetchCreatorData = async (creatorAlias) => {
try {
@@ -53,7 +48,6 @@ export const useBrandingStore = defineStore(
return {
currentBrand,
value,
- loading,
- presentationInfos
+ loading, updateBrand, presentationInfos
}
})
diff --git a/frontend/src/views/creators/BannerActions.vue b/frontend/src/views/creators/BannerActions.vue
index 62c99de..f188be6 100644
--- a/frontend/src/views/creators/BannerActions.vue
+++ b/frontend/src/views/creators/BannerActions.vue
@@ -1,8 +1,7 @@
@@ -53,11 +39,11 @@ onMounted(async () => {
diff --git a/frontend/src/views/creators/CreatorLayout.vue b/frontend/src/views/creators/CreatorLayout.vue
index 9f83619..37785fe 100644
--- a/frontend/src/views/creators/CreatorLayout.vue
+++ b/frontend/src/views/creators/CreatorLayout.vue
@@ -22,9 +22,16 @@