From 2fda10a13d332d7c4c30c68565edaa0cfba2948a Mon Sep 17 00:00:00 2001 From: Jonathan Bourdon Date: Thu, 13 Feb 2025 18:22:09 -0500 Subject: [PATCH] Fix loading of page when navigating to pages --- frontend/src/stores/brandingStore.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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