mirror of
https://github.com/versia-pub/frontend.git
synced 2026-03-13 03:29: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
|
|
@ -109,8 +109,6 @@ const props = defineProps<{
|
|||
}>();
|
||||
|
||||
const skeleton = computed(() => !props.account);
|
||||
const identity = useCurrentIdentity();
|
||||
const client = useClient();
|
||||
const config = useConfig();
|
||||
const accountId = computed(() => props.account?.id ?? null);
|
||||
const { relationship, isLoading } = useRelationship(client, accountId);
|
||||
|
|
@ -155,7 +153,6 @@ const visibleRoles = computed(
|
|||
() => props.account?.roles.filter((r) => r.visible) ?? [],
|
||||
);
|
||||
|
||||
const settings = useSettings();
|
||||
const { display_name, fields, note } = useParsedAccount(
|
||||
computed(() => props.account),
|
||||
settings,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue