refactor: ♻️ Make auth store require less null checks

This commit is contained in:
Jesse Wierzbinski 2026-01-09 22:35:46 +01:00
parent 68e23a818a
commit b23ed66401
No known key found for this signature in database
32 changed files with 111 additions and 124 deletions

View file

@ -2,7 +2,7 @@
<Button
variant="secondary"
:disabled="isLoading || relationship?.requested"
v-if="!isMe && authStore.isSignedIn"
v-if="!isMe"
@click="relationship?.following ? unfollow() : follow()"
>
<Loader v-if="isLoading" class="animate-spin" />
@ -31,7 +31,7 @@ const { account } = defineProps<{
const { relationship, isLoading } = useRelationship(account.id);
const authStore = useAuthStore();
const isMe = authStore.account?.id === account.id;
const isMe = authStore.accountOptional?.id === account.id;
const follow = async () => {
if (preferences.confirm_actions.value.includes("follow")) {