frontend/composables/Instance.ts
2024-04-25 19:54:02 -10:00

14 lines
343 B
TypeScript

import type { Mastodon } from "megalodon";
import type { Instance } from "~/types/mastodon/instance";
export const useInstance = async (client: Mastodon | null) => {
if (!client) {
return null;
}
return (await client.getInstance()).data as Instance & {
banner?: string;
lysand_version?: string;
};
};