1
0
Fork 1
mirror of https://github.com/elk-zone/elk.git synced 2024-11-05 08:29:57 +00:00
elk/composables/client.ts

11 lines
272 B
TypeScript
Raw Normal View History

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