Fix loading of page when navigating to pages
This commit is contained in:
@@ -1,7 +1,8 @@
|
|||||||
import {defineStore} from 'pinia'
|
import {defineStore} from 'pinia'
|
||||||
import {useClient} from "@/plugins/api.js";
|
import {useClient} from "@/plugins/api.js";
|
||||||
import {useSessionStorage} from "@vueuse/core";
|
import {useSessionStorage} from "@vueuse/core";
|
||||||
import {ref} from "vue";
|
import {ref, watch} from "vue";
|
||||||
|
import {useRoute} from "vue-router";
|
||||||
|
|
||||||
export const useBrandingStore = defineStore(
|
export const useBrandingStore = defineStore(
|
||||||
'branding',
|
'branding',
|
||||||
@@ -16,6 +17,13 @@ export const useBrandingStore = defineStore(
|
|||||||
{writeDefaults: false})
|
{writeDefaults: false})
|
||||||
|
|
||||||
const presentationInfos = ref([])
|
const presentationInfos = ref([])
|
||||||
|
const route = useRoute()
|
||||||
|
watch(
|
||||||
|
() => route.params.creator,
|
||||||
|
async (creator) => {
|
||||||
|
await updateBrand(creator);
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
async function updateBrand(newBrand) {
|
async function updateBrand(newBrand) {
|
||||||
loading.value = true
|
loading.value = true
|
||||||
|
|||||||
Reference in New Issue
Block a user