mirror of
https://github.com/versia-pub/frontend.git
synced 2026-03-13 03:29:16 +01:00
refactor: ♻️ Rewrite authentication page
This commit is contained in:
parent
1194bc4ffb
commit
c483f35b99
26 changed files with 373 additions and 797 deletions
|
|
@ -4,14 +4,16 @@ import type { Account } from "@versia/client/types";
|
|||
export const useAccountFromAcct = (
|
||||
client: MaybeRef<Client | null>,
|
||||
acct: string,
|
||||
): Ref<Account | null> => {
|
||||
): { account: Ref<Account | null>; isLoading: Ref<boolean> } => {
|
||||
const output = ref(null as Account | null);
|
||||
const isLoading = ref(true);
|
||||
|
||||
ref(client)
|
||||
.value?.lookupAccount(acct)
|
||||
.then((res) => {
|
||||
isLoading.value = false;
|
||||
output.value = res.data;
|
||||
});
|
||||
|
||||
return output;
|
||||
return { account: output, isLoading };
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue