Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

fix unified logs gate (#38010)

Jordi Enric03b0f35e3d0d
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 d315326a6ba..35a7b60cede 100644
--- a/apps/studio/components/layouts/LogsLayout/LogsSidebarMenuV2.tsx
+++ b/apps/studio/components/layouts/LogsLayout/LogsSidebarMenuV2.tsx
@@ -112,8 +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 { plan: orgPlan } = useCurrentOrgPlan()
+ const isFreePlan = orgPlan?.id === 'free'
const { data: savedQueriesRes, isLoading: savedQueriesLoading } = useContentQuery({
projectRef: ref,