elk/composables/client.ts

8 lines
202 B
TypeScript
Raw Normal View History

import type { MastoClient } from 'masto'
2022-11-28 14:06:00 +03:00
export const useMasto = () => useNuxtApp().$masto.api as MastoClient
export const setMasto = (masto: MastoClient) => {
useNuxtApp().$masto?.replace(masto)
}