refactor(projects): use store.loading instead of async component

This commit is contained in:
2025-11-23 13:32:28 +01:00
parent b7843f8586
commit 3323022a3b
2 changed files with 6 additions and 4 deletions

View File

@@ -12,7 +12,7 @@ const [backgroundImage, visitDisabledImage] = useImages(
useRender((ctx) => {
ctx.drawImage(backgroundImage!, 0, 0);
if (store.projects[store.currentProject]!.url === null) {
if (store.projects[store.currentProject]?.url === null) {
ctx.drawImage(visitDisabledImage!, 144, 172);
}
});

View File

@@ -4,12 +4,14 @@ import Projects from "./Projects.vue";
const store = useProjectsStore();
store.$reset();
await store.loadProjects();
onMounted(async () => {
store.$reset();
await store.loadProjects();
});
</script>
<template>
<Background />
<Projects />
<Projects v-if="!store.loading" />
</template>