mirror of
https://github.com/versia-pub/frontend.git
synced 2026-03-13 03:29:16 +01:00
refactor: ♻️ Make auth store require less null checks
This commit is contained in:
parent
68e23a818a
commit
b23ed66401
32 changed files with 111 additions and 124 deletions
|
|
@ -23,7 +23,7 @@
|
|||
/>
|
||||
<Button
|
||||
data-switch
|
||||
v-if="authStore.identity?.id !== identity.id"
|
||||
v-if="authStore.identityOptional?.id !== identity.id"
|
||||
@click="authStore.setActiveIdentity(identity.id)"
|
||||
variant="outline"
|
||||
>
|
||||
|
|
|
|||
|
|
@ -26,10 +26,7 @@ const authStore = useAuthStore();
|
|||
<SidebarMenu class="gap-3">
|
||||
<SidebarMenuItem>
|
||||
<AccountManager>
|
||||
<SidebarMenuButton
|
||||
v-if="authStore.account && authStore.instance"
|
||||
size="lg"
|
||||
>
|
||||
<SidebarMenuButton v-if="authStore.isSignedIn" size="lg">
|
||||
<TinyCard
|
||||
:account="authStore.account"
|
||||
:domain="authStore.instance.domain"
|
||||
|
|
|
|||
|
|
@ -11,13 +11,10 @@ const authStore = useAuthStore();
|
|||
|
||||
<template>
|
||||
<SidebarHeader>
|
||||
<SidebarMenu>
|
||||
<SidebarMenu v-if="authStore.isSignedIn">
|
||||
<SidebarMenuItem>
|
||||
<NuxtLink href="/">
|
||||
<InstanceSmallCard
|
||||
v-if="authStore.instance"
|
||||
:instance="authStore.instance"
|
||||
/>
|
||||
<InstanceSmallCard :instance="authStore.instance" />
|
||||
</NuxtLink>
|
||||
</SidebarMenuItem>
|
||||
</SidebarMenu>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue