elk/composables/client.ts

8 lines
202 B
TypeScript
Raw Normal View History

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