Guest navigation state

This commit is contained in:
2025-12-02 00:09:51 -05:00
parent 9fe18f6b1a
commit 26fd323f43
3 changed files with 22 additions and 4 deletions

View File

@@ -5,7 +5,7 @@ export const useUserStore = defineStore('user', () => {
const user = ref(null)
const roles = computed(() => new Set(user.value?.roleData?.map(r => r.name) ?? []));
const loaded = ref(false);
const state = computed(() => user.value.state);
const state = computed<string | undefined>(() => user.value?.state || undefined);
const isLoggedIn = computed(() => user.value !== null)
async function loadUser() {