Fix loading of page when navigating to pages
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user