mirror of
https://github.com/versia-pub/frontend.git
synced 2026-03-13 03:29:16 +01:00
feat: ✨ Add profile viewer
This commit is contained in:
parent
a6c5093cf5
commit
1194bc4ffb
19 changed files with 466 additions and 47 deletions
17
composables/AccountAcct.ts
Normal file
17
composables/AccountAcct.ts
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
import type { Client } from "@versia/client";
|
||||
import type { Account } from "@versia/client/types";
|
||||
|
||||
export const useAccountFromAcct = (
|
||||
client: MaybeRef<Client | null>,
|
||||
acct: string,
|
||||
): Ref<Account | null> => {
|
||||
const output = ref(null as Account | null);
|
||||
|
||||
ref(client)
|
||||
.value?.lookupAccount(acct)
|
||||
.then((res) => {
|
||||
output.value = res.data;
|
||||
});
|
||||
|
||||
return output;
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue