Skip to content

Commit ec6564b

Browse files
authored
Fix unified logs stuff on self-hosted (supabase#37394)
1 parent 740eeb8 commit ec6564b

File tree

2 files changed

+18
-15
lines changed

2 files changed

+18
-15
lines changed

apps/studio/components/layouts/LogsLayout/LogsSidebarMenuV2.tsx

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -229,19 +229,21 @@ export function LogsSidebarMenuV2() {
229229

230230
return (
231231
<div className="pb-12 relative">
232-
<FeaturePreviewSidebarPanel
233-
className="mx-4 mt-4"
234-
illustration={<Badge variant="default">Coming soon</Badge>}
235-
title="New logs"
236-
description="Get early access"
237-
actions={
238-
<Link href="https://forms.supabase.com/unified-logs-signup" target="_blank">
239-
<Button type="default" size="tiny">
240-
Early access
241-
</Button>
242-
</Link>
243-
}
244-
/>
232+
{IS_PLATFORM && (
233+
<FeaturePreviewSidebarPanel
234+
className="mx-4 mt-4"
235+
illustration={<Badge variant="default">Coming soon</Badge>}
236+
title="New logs"
237+
description="Get early access"
238+
actions={
239+
<Link href="https://forms.supabase.com/unified-logs-signup" target="_blank">
240+
<Button type="default" size="tiny">
241+
Early access
242+
</Button>
243+
</Link>
244+
}
245+
/>
246+
)}
245247
{isUnifiedLogsPreviewAvailable && (
246248
<FeaturePreviewSidebarPanel
247249
className="mx-4 mt-4"

apps/studio/pages/project/[ref]/logs/index.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import LogsLayout from 'components/layouts/LogsLayout/LogsLayout'
99
import ProjectLayout from 'components/layouts/ProjectLayout/ProjectLayout'
1010
import { useLocalStorageQuery } from 'hooks/misc/useLocalStorage'
1111
import { useSelectedOrganization } from 'hooks/misc/useSelectedOrganization'
12+
import { IS_PLATFORM } from 'lib/constants'
1213
import type { NextPageWithLayout } from 'types'
1314

1415
export const LogPage: NextPageWithLayout = () => {
@@ -33,9 +34,9 @@ export const LogPage: NextPageWithLayout = () => {
3334
// Handle redirects when unified logs preview flag changes
3435
useEffect(() => {
3536
// Only handle redirects if we're currently on a logs page
36-
if (!router.asPath.includes('/logs') || !hasLoaded) return
37+
if (!router.asPath.includes('/logs') || (IS_PLATFORM && !hasLoaded)) return
3738

38-
if (isUnifiedLogsEnabled) {
39+
if (IS_PLATFORM && isUnifiedLogsEnabled) {
3940
// If unified logs preview is enabled and we're not already on the main logs page
4041
if (router.asPath !== `/project/${ref}/logs` && router.asPath.includes('/logs/')) {
4142
router.push(`/project/${ref}/logs`)

0 commit comments

Comments
 (0)