dify/web/app/components/system-features-initor/store.tsx
StyleZhang 5009036a26 fix
2024-07-15 16:31:57 +08:00

19 lines
541 B
TypeScript

import { create } from 'zustand'
import type { SystemFeatures } from '@/types/feature'
type StateAndAction = {
systemFeatures: SystemFeatures
setSystemFeatures: (features: SystemFeatures) => void
}
export const useSystemFeaturesStore = create<StateAndAction>(set => ({
systemFeatures: {
sso_enforced_for_signin: false,
sso_enforced_for_signin_protocol: '',
sso_enforced_for_web: false,
sso_enforced_for_web_protocol: '',
expired_at: 0,
},
setSystemFeatures: features => set({ systemFeatures: features }),
}))