rewrite client providing & fix sign in redirect
This commit is contained in:
parent
942b9dcce8
commit
0caa9aab88
5 changed files with 106 additions and 53 deletions
|
@ -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()
|
||||
}, {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue