initial commit

This commit is contained in:
thislight 2024-07-14 20:28:44 +08:00
commit 5449e361d5
46 changed files with 8309 additions and 0 deletions

12
src/masto/acct.ts Normal file
View 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"
})
}