fixed an error with loading the welcome message when logged in

This commit is contained in:
2025-12-17 00:26:46 -05:00
parent 2f7eb37771
commit b6a9b6f855

View File

@@ -14,8 +14,10 @@ function goToApplication() {
}
onMounted(async () => {
let policy = await getWelcomeMessage() as any;
welcomeRef.value.innerHTML = policy;
if (user.state == 'member') {
let policy = await getWelcomeMessage() as any;
welcomeRef.value.innerHTML = policy;
}
})
const welcomeRef = ref<HTMLElement>(null);
@@ -23,7 +25,12 @@ const welcomeRef = ref<HTMLElement>(null);
<template>
<div>
<div v-if="user.state == 'guest'" class="bg-background text-foreground px-6 py-12 selection:bg-primary/10">
<div v-if="user.state == 'member'" class="mt-10">
<div ref="welcomeRef" class="bookstack-container">
<!-- bookstack -->
</div>
</div>
<div v-else class="text-foreground px-6 py-12 selection:bg-primary/10">
<div class="max-w-5xl mx-auto space-y-8">
<header class="space-y-4">
@@ -124,10 +131,5 @@ const welcomeRef = ref<HTMLElement>(null);
</section>
</div>
</div>
<div v-else class="mt-10">
<div ref="welcomeRef" class="bookstack-container">
<!-- bookstack -->
</div>
</div>
</div>
</template>