mirror of
https://github.com/supabase/supabase.git
synced 2026-07-03 11:14:34 +08:00
* ref(etl): Rename ETL Replication to Replication and update docs * Fix * Fix * Fix * Fix * Fix
20 lines
654 B
TypeScript
20 lines
654 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 privateAlphaProjectRefs =
|
|
typeof etlPrivateAlpha === 'string'
|
|
? (etlPrivateAlpha as string).split(',').map((x) => x.trim())
|
|
: []
|
|
|
|
const etlShowForAllProjects = useFlag('etlPrivateAlphaOverride')
|
|
|
|
return etlShowForAllProjects || privateAlphaProjectRefs.includes(organization?.slug ?? '')
|
|
}
|