mirror of
https://github.com/versia-pub/frontend.git
synced 2025-12-06 08:28:20 +01:00
10 lines
204 B
TypeScript
10 lines
204 B
TypeScript
import type { Mastodon } from "megalodon";
|
|
|
|
export const useInstance = async (client: Mastodon | null) => {
|
|
if (!client) {
|
|
return null;
|
|
}
|
|
|
|
return (await client.getInstance()).data;
|
|
};
|