elk/composables/client.ts

11 lines
272 B
TypeScript
Raw Normal View History

2022-11-14 05:20:07 +03:00
import type { MastoClient } from 'masto'
2022-11-18 00:32:03 +03:00
import type { ClientState } from '~/plugins/store.client'
2022-11-13 08:34:43 +03:00
2022-11-14 05:20:07 +03:00
export function useMasto() {
2022-11-18 00:32:03 +03:00
return useNuxtApp().$masto as Promise<MastoClient>
2022-11-13 08:34:43 +03:00
}
2022-11-15 18:48:23 +03:00
2022-11-18 00:32:03 +03:00
export function useClientState() {
return useNuxtApp().$clientState as ClientState
2022-11-15 18:48:23 +03:00
}