mirror of
https://github.com/supabase/supabase.git
synced 2026-10-16 14:49:10 +03:00
Add new command menu to studio. Ports over commands from old menu (with some minor reorganization), then adds: - Branch switcher - Project switcher
21 lines
729 B
TypeScript
21 lines
729 B
TypeScript
import { useCallback } from 'react'
|
|
|
|
import { subscriptionHasHipaaAddon } from 'components/interfaces/Billing/Subscription/Subscription.utils'
|
|
import { useOrgSubscriptionQuery } from 'data/subscriptions/org-subscription-query'
|
|
import { useSelectedOrganization } from 'hooks/misc/useSelectedOrganization'
|
|
|
|
export function useDisallowHipaa() {
|
|
const selectedOrganization = useSelectedOrganization()
|
|
const { data: subscription } = useOrgSubscriptionQuery({ orgSlug: selectedOrganization?.slug })
|
|
const hasHipaaAddon = subscriptionHasHipaaAddon(subscription)
|
|
|
|
const disallowHipaa = useCallback(
|
|
(allowed: boolean) => {
|
|
return hasHipaaAddon ? false : allowed
|
|
},
|
|
[hasHipaaAddon]
|
|
)
|
|
|
|
return disallowHipaa
|
|
}
|