Files
Incidents-Data-Portal/frontend/src/components/page-container/context.ts
T

11 lines
367 B
TypeScript
Raw Normal View History

2026-07-10 18:55:55 +08:00
import type { useAppStore } from '~/stores/app.ts'
export const LayoutMenuKey = Symbol('LayoutMenu')
export function useLayoutMenuProvide(layoutMenu: ReturnType<typeof useLayoutMenu>, appStore: ReturnType<typeof useAppStore>) {
provide(LayoutMenuKey, { layoutMenu, appStore })
}
export function useLayoutMenuInject() {
return inject(LayoutMenuKey, {} as any)
}