2024-07-14 12:28:44 +00:00
|
|
|
import { Accessor, createResource } from "solid-js";
|
2024-07-15 05:59:10 +00:00
|
|
|
import type { mastodon } from "masto";
|
2024-07-14 12:28:44 +00:00
|
|
|
|
2024-07-15 05:59:10 +00:00
|
|
|
export function useAcctProfile(client: Accessor<mastodon.rest.Client>) {
|
2024-07-14 12:28:44 +00:00
|
|
|
return createResource(client, (client) => {
|
|
|
|
return client.v1.accounts.verifyCredentials()
|
|
|
|
}, {
|
|
|
|
name: "MastodonAccountProfile"
|
|
|
|
})
|
|
|
|
}
|