Fixed data loading timing issue

This commit is contained in:
Alexis
2025-03-13 22:11:19 +01:00
parent 1de5f13df6
commit 0126d42762

View File

@@ -45,7 +45,10 @@ 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) => {
if (n?.data) {
setCurrentMenu([
{ {
tooltip: t("entity.world.backToMy"), tooltip: t("entity.world.backToMy"),
to: "/my", to: "/my",
@@ -57,7 +60,9 @@ setCurrentMenu([
to: `/my/worlds/${calendar.value?.data.world?.id}`, to: `/my/worlds/${calendar.value?.data.world?.id}`,
phIcon: "world" phIcon: "world"
}, },
]) ])
}
}, { immediate: true })
</script> </script>
<template> <template>