This commit is contained in:
Georges-Antoine Assi
2025-08-23 07:55:50 -04:00
parent 14cf963a2d
commit 4fbd8a2da0

View File

@@ -23,7 +23,7 @@ import storeNavigation from "@/stores/navigation";
import storePlatforms from "@/stores/platforms";
import type { Events } from "@/types/emitter";
import type { Emitter } from "mitt";
import { inject, onBeforeMount, onMounted, ref } from "vue";
import { inject, onBeforeMount, ref } from "vue";
import { isNull } from "lodash";
import { useRoute } from "vue-router";
import { ROUTES } from "@/plugins/router";
@@ -55,6 +55,8 @@ const virtualCollectionTypeRef = ref(
);
function fetchData() {
document.removeEventListener("network-quiesced", fetchData);
if (fetchedType.value !== "platform") {
platformsStore.fetchPlatforms();
}
@@ -70,7 +72,9 @@ function fetchData() {
navigationStore.reset();
document.removeEventListener("network-quiesced", fetchData);
// Hack to prevent main page transition on first load
const main = document.getElementById("main");
if (main) main.classList.remove("no-transition");
}
onBeforeMount(async () => {
@@ -93,12 +97,6 @@ onBeforeMount(async () => {
fetchedType.value = "platform";
}
});
onMounted(() => {
// Hack to prevent main page transition on first load
const main = document.getElementById("main");
if (main) main.classList.remove("no-transition");
});
</script>
<template>