diff --git a/apps/studio/components/interfaces/App/FeaturePreview/FeaturePreviewContext.tsx b/apps/studio/components/interfaces/App/FeaturePreview/FeaturePreviewContext.tsx index 0ab0b040922..2578ca33fa2 100644 --- a/apps/studio/components/interfaces/App/FeaturePreview/FeaturePreviewContext.tsx +++ b/apps/studio/components/interfaces/App/FeaturePreview/FeaturePreviewContext.tsx @@ -11,6 +11,7 @@ import { } from 'react' import { FeatureFlagContext, LOCAL_STORAGE_KEYS } from 'common' +import { useSelectedOrganization } from 'hooks/misc/useSelectedOrganization' import { useFlag, useIsRealtimeSettingsFFEnabled } from 'hooks/ui/useFlag' import { EMPTY_OBJ } from 'lib/void' import { FEATURE_PREVIEWS } from './FeaturePreview.constants' @@ -91,8 +92,12 @@ export const useIsInlineEditorEnabled = () => { } export const useUnifiedLogsPreview = () => { + const organization = useSelectedOrganization() const { flags, onUpdateFlag } = useFeaturePreviewContext() - const isEnabled = flags[LOCAL_STORAGE_KEYS.UI_PREVIEW_UNIFIED_LOGS] + + const isTeamsOrEnterprise = ['team', 'enterprise'].includes(organization?.plan.id ?? '') + const isEnabled = isTeamsOrEnterprise && flags[LOCAL_STORAGE_KEYS.UI_PREVIEW_UNIFIED_LOGS] + const enable = () => onUpdateFlag(LOCAL_STORAGE_KEYS.UI_PREVIEW_UNIFIED_LOGS, true) const disable = () => onUpdateFlag(LOCAL_STORAGE_KEYS.UI_PREVIEW_UNIFIED_LOGS, false) return { isEnabled, enable, disable } diff --git a/apps/studio/components/interfaces/App/FeaturePreview/UnifiedLogsPreview.tsx b/apps/studio/components/interfaces/App/FeaturePreview/UnifiedLogsPreview.tsx index 981d98ad42e..b757cba8f45 100644 --- a/apps/studio/components/interfaces/App/FeaturePreview/UnifiedLogsPreview.tsx +++ b/apps/studio/components/interfaces/App/FeaturePreview/UnifiedLogsPreview.tsx @@ -19,6 +19,9 @@ export const UnifiedLogsPreview = () => { Experience our enhanced logs interface with improved filtering, real-time updates, and a unified view across all your services. Built for better performance and easier debugging.
++ This interface will only be available for organizations on the Team plan or above. +
Enabling this preview will: