Files
policy-ui/app/composables/useSidebarFeatures.ts
Jordan Weingarten 67482f6629 WIP jordan
2026-04-16 11:11:44 -05:00

24 lines
531 B
TypeScript

import { useLocalStorageRef } from '~/utils/useLocalStorageRef'
import type { Ref } from 'vue'
interface SidebarFeatures {
showWorkstations: boolean
showAiTools: boolean
showLeadsHub: boolean
}
const KEY = 'policy-ui-sidebar-features-v1'
let _shared: Ref<SidebarFeatures> | null = null
export function useSidebarFeatures() {
if (!_shared) {
_shared = useLocalStorageRef<SidebarFeatures>(KEY, () => ({
showWorkstations: false,
showAiTools: false,
showLeadsHub: true,
}))
}
return _shared
}