This commit is contained in:
Jordi Enric committed 2025-08-18 15:36:45 +02:00
1 parent 368cd6a187
commit 5cf5d02dfc
2 files changed
+6 -9

No files matched your search

@@ -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 }
}
@@ -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 (
<div className="pb-12 relative">
{IS_PLATFORM && !isUnifiedLogsPreviewAvailable && (
{IS_PLATFORM && !unifiedLogsFlagEnabled && (
<FeaturePreviewSidebarPanel
className="mx-4 mt-4"
illustration={<Badge variant="default">Coming soon</Badge>}
@@ -246,7 +244,7 @@ export function LogsSidebarMenuV2() {
}
/>
)}
{isUnifiedLogsPreviewAvailable && (
{unifiedLogsFlagEnabled && (
<FeaturePreviewSidebarPanel
className="mx-4 mt-4"
title="New Logs Interface"