WIP jordan
This commit is contained in:
23
app/composables/useSidebarFeatures.ts
Normal file
23
app/composables/useSidebarFeatures.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
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
|
||||
}
|
||||
Reference in New Issue
Block a user