mirror of
https://github.com/versia-pub/frontend.git
synced 2025-12-06 16:38:20 +01:00
13 lines
259 B
TypeScript
13 lines
259 B
TypeScript
import type { Mastodon } from "megalodon";
|
|
|
|
export const useAccount = async (
|
|
client: Mastodon | null,
|
|
accountId: string,
|
|
) => {
|
|
if (process.server || !client) {
|
|
return null;
|
|
}
|
|
|
|
return (await client.getAccount(accountId)).data;
|
|
};
|