13 lines
397 B
TypeScript
13 lines
397 B
TypeScript
|
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"
|
||
|
})
|
||
|
}
|