Fixed data loading timing issue
This commit is contained in:
@@ -45,19 +45,24 @@ const isLoading = computed(() => calendarStatus.value === "pending" || categorie
|
|||||||
const { t } = useI18n()
|
const { t } = useI18n()
|
||||||
const { setCurrentMenu } = useUiStore()
|
const { setCurrentMenu } = useUiStore()
|
||||||
|
|
||||||
setCurrentMenu([
|
// Set menu once we have the calendar data
|
||||||
{
|
watch(calendar, (n) => {
|
||||||
tooltip: t("entity.world.backToMy"),
|
if (n?.data) {
|
||||||
to: "/my",
|
setCurrentMenu([
|
||||||
phIcon: "universe",
|
{
|
||||||
phIconWeight: "regular"
|
tooltip: t("entity.world.backToMy"),
|
||||||
},
|
to: "/my",
|
||||||
{
|
phIcon: "universe",
|
||||||
tooltip: t("entity.world.backToSingle", { world: calendar.value?.data.world?.name }),
|
phIconWeight: "regular"
|
||||||
to: `/my/worlds/${calendar.value?.data.world?.id}`,
|
},
|
||||||
phIcon: "world"
|
{
|
||||||
},
|
tooltip: t("entity.world.backToSingle", { world: calendar.value?.data.world?.name }),
|
||||||
])
|
to: `/my/worlds/${calendar.value?.data.world?.id}`,
|
||||||
|
phIcon: "world"
|
||||||
|
},
|
||||||
|
])
|
||||||
|
}
|
||||||
|
}, { immediate: true })
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|||||||
Reference in New Issue
Block a user