initial commit
This commit is contained in:
commit
5449e361d5
46 changed files with 8309 additions and 0 deletions
12
src/masto/acct.ts
Normal file
12
src/masto/acct.ts
Normal file
|
@ -0,0 +1,12 @@
|
|||
import { Accessor, createResource } from "solid-js";
|
||||
import { Account } from "../accounts/stores";
|
||||
import { useMastoClientFor } from "./clients";
|
||||
|
||||
export function useAcctProfile(account: Accessor<Account>) {
|
||||
const client = useMastoClientFor(account)
|
||||
return createResource(client, (client) => {
|
||||
return client.v1.accounts.verifyCredentials()
|
||||
}, {
|
||||
name: "MastodonAccountProfile"
|
||||
})
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue