diff --git a/apps/studio/components/interfaces/App/FeaturePreview/FeaturePreviewContext.tsx b/apps/studio/components/interfaces/App/FeaturePreview/FeaturePreviewContext.tsx index 3cf9aaec856..8a244a0205d 100644 --- a/apps/studio/components/interfaces/App/FeaturePreview/FeaturePreviewContext.tsx +++ b/apps/studio/components/interfaces/App/FeaturePreview/FeaturePreviewContext.tsx @@ -92,14 +92,13 @@ export const useIsInlineEditorEnabled = () => { } export const useUnifiedLogsPreview = () => { - const { data: organization } = useSelectedOrganizationQuery() const { flags, onUpdateFlag } = useFeaturePreviewContext() - const isTeamsOrEnterprise = ['team', 'enterprise'].includes(organization?.plan.id ?? '') - const isEnabled = isTeamsOrEnterprise && flags[LOCAL_STORAGE_KEYS.UI_PREVIEW_UNIFIED_LOGS] + const isEnabled = 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/layouts/LogsLayout/LogsSidebarMenuV2.tsx b/apps/studio/components/layouts/LogsLayout/LogsSidebarMenuV2.tsx index 3966b31be97..35a7b60cede 100644 --- a/apps/studio/components/layouts/LogsLayout/LogsSidebarMenuV2.tsx +++ b/apps/studio/components/layouts/LogsLayout/LogsSidebarMenuV2.tsx @@ -112,10 +112,8 @@ export function LogsSidebarMenuV2() { // [Jordi] We only want to show ETL logs if the user has the feature enabled AND they're using the feature aka they've created a source. const showETLLogs = enablePgReplicate && (etlData?.sources?.length ?? 0) > 0 && !isETLLoading - const { plan: orgPlan, isLoading: isOrgPlanLoading } = useCurrentOrgPlan() - const isFreePlan = !isOrgPlanLoading && orgPlan?.id === 'free' - - const isUnifiedLogsPreviewAvailable = unifiedLogsFlagEnabled && !isOrgPlanLoading + const { plan: orgPlan } = useCurrentOrgPlan() + const isFreePlan = orgPlan?.id === 'free' const { data: savedQueriesRes, isLoading: savedQueriesLoading } = useContentQuery({ projectRef: ref, @@ -231,7 +229,7 @@ export function LogsSidebarMenuV2() { return (