mirror of
https://github.com/langgenius/dify.git
synced 2026-07-15 17:37:38 +08:00
16 lines
490 B
TypeScript
16 lines
490 B
TypeScript
'use client'
|
|
|
|
import { atom } from 'jotai'
|
|
import { systemFeaturesQueryOptions } from '@/features/system-features/client'
|
|
import { atomWithResolvedSuspenseQuery } from '@/utils/query-atoms'
|
|
|
|
const systemFeaturesQueryAtom = atomWithResolvedSuspenseQuery(() => systemFeaturesQueryOptions())
|
|
|
|
export const systemFeaturesAtom = atom((get) => {
|
|
return get(systemFeaturesQueryAtom).data
|
|
})
|
|
|
|
export const datasetRbacEnabledAtom = atom((get) => {
|
|
return get(systemFeaturesAtom).rbac_enabled
|
|
})
|