mirror of
https://github.com/versia-pub/frontend.git
synced 2026-03-13 11:39:16 +01:00
perf: ♻️ Use global instance of composable instead of an instance per component for identities, client and settings
This commit is contained in:
parent
f1ada1745d
commit
3428e4b5b6
38 changed files with 104 additions and 131 deletions
|
|
@ -1,9 +1,9 @@
|
|||
<template>
|
||||
<a :href="`/@${account.acct}`"
|
||||
class="shrink break-all rounded bg-primary-700/80 text-primary-200 px-2 py-1 not-prose font-semibold cursor-pointer [&:not(:last-child)]:mr-1 duration-200 hover:bg-primary-600/30">
|
||||
class="shrink break-all rounded bg-dark-200 ring-1 ring-white/5 ring-inset text-primary-200 px-2 py-1 not-prose font-semibold cursor-pointer [&:not(:last-child)]:mr-1 duration-200 hover:bg-primary-600/30">
|
||||
<img class="size-[1em] rounded ring-1 ring-white/5 !inline align-middle mb-1 mr-1" :src="account.avatar"
|
||||
:alt="`${account.acct}'s avatar'`" />
|
||||
{{ account.display_name }}
|
||||
{{ account.display_name || account.acct }}
|
||||
</a>
|
||||
</template>
|
||||
|
||||
|
|
|
|||
|
|
@ -176,9 +176,6 @@ useListen("composer:send-edit", (note) => {
|
|||
}
|
||||
});
|
||||
|
||||
const client = useClient();
|
||||
const identity = useCurrentIdentity();
|
||||
const settings = useSettings();
|
||||
const {
|
||||
loaded,
|
||||
note: outputtedNote,
|
||||
|
|
|
|||
|
|
@ -18,6 +18,5 @@ const props = defineProps<{
|
|||
account_id: string | null;
|
||||
}>();
|
||||
|
||||
const client = useClient();
|
||||
const account = useAccount(client, props.account_id);
|
||||
</script>
|
||||
Loading…
Add table
Add a link
Reference in a new issue