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