mirror of
https://github.com/supabase/supabase.git
synced 2026-10-11 12:25:05 +03:00
## Context
Just to avoid confusion 🤦 ETL Private Alpha config cat feature flag
holds org slugs, not project refs
20 lines
648 B
TypeScript
20 lines
648 B
TypeScript
import { useFlag } from 'common'
|
|
import { useSelectedOrganizationQuery } from 'hooks/misc/useSelectedOrganization'
|
|
|
|
/**
|
|
* Organization level opt in for ETL private alpha
|
|
*/
|
|
export const useIsETLPrivateAlpha = () => {
|
|
const { data: organization } = useSelectedOrganizationQuery()
|
|
|
|
const etlPrivateAlpha = useFlag('etlPrivateAlpha')
|
|
const privateAlphaOrgSlugs =
|
|
typeof etlPrivateAlpha === 'string'
|
|
? (etlPrivateAlpha as string).split(',').map((x) => x.trim())
|
|
: []
|
|
|
|
const etlShowForAllProjects = useFlag('etlPrivateAlphaOverride')
|
|
|
|
return etlShowForAllProjects || privateAlphaOrgSlugs.includes(organization?.slug ?? '')
|
|
}
|