tutu/src/masto/acct.ts

13 lines
397 B
TypeScript
Raw Normal View History

2024-07-14 12:28:44 +00:00
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"
})
}