Files
supabase/apps/studio/hooks/misc/useOrgOptedIntoAi.ts
Charis 84732ff44c feat: add new command menu to studio (#28432)
Add new command menu to studio. Ports over commands from old menu (with some minor reorganization), then adds:
- Branch switcher
- Project switcher
2024-08-08 16:42:07 -04:00

13 lines
491 B
TypeScript

import { useDisallowHipaa } from 'hooks/misc/useDisallowHipaa'
import { useSelectedOrganization } from 'hooks/misc/useSelectedOrganization'
import { OPT_IN_TAGS } from 'lib/constants'
export function useOrgOptedIntoAi() {
const selectedOrganization = useSelectedOrganization()
const optInTags = selectedOrganization?.opt_in_tags
const isOptedIntoAI = optInTags?.includes(OPT_IN_TAGS.AI_SQL) ?? false
const disallowHipaa = useDisallowHipaa()
return disallowHipaa(isOptedIntoAI)
}