rewrite client providing & fix sign in redirect

This commit is contained in:
thislight 2024-07-15 13:59:10 +08:00
parent 942b9dcce8
commit 0caa9aab88
5 changed files with 106 additions and 53 deletions

View file

@ -1,9 +1,7 @@
import { Accessor, createResource } from "solid-js";
import { Account } from "../accounts/stores";
import { useMastoClientFor } from "./clients";
import type { mastodon } from "masto";
export function useAcctProfile(account: Accessor<Account>) {
const client = useMastoClientFor(account)
export function useAcctProfile(client: Accessor<mastodon.rest.Client>) {
return createResource(client, (client) => {
return client.v1.accounts.verifyCredentials()
}, {