diff --git a/frontend/src/stores/brandingStore.js b/frontend/src/stores/brandingStore.js index eecbee3..15808bb 100644 --- a/frontend/src/stores/brandingStore.js +++ b/frontend/src/stores/brandingStore.js @@ -1,7 +1,8 @@ import {defineStore} from 'pinia' import {useClient} from "@/plugins/api.js"; import {useSessionStorage} from "@vueuse/core"; -import {ref} from "vue"; +import {ref, watch} from "vue"; +import {useRoute} from "vue-router"; export const useBrandingStore = defineStore( 'branding', @@ -16,6 +17,13 @@ export const useBrandingStore = defineStore( {writeDefaults: false}) const presentationInfos = ref([]) + const route = useRoute() + watch( + () => route.params.creator, + async (creator) => { + await updateBrand(creator); + } + ) async function updateBrand(newBrand) { loading.value = true