Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

chore(frontend): move useThemedHtml into layout (#126869)

Paul D'Ambraa6ec9e68746a
diff --git a/frontend/bin/layer-baseline.txt b/frontend/bin/layer-baseline.txt
index de8ec7feb74d..057e051d4346 100644
--- a/frontend/bin/layer-baseline.txt
+++ b/frontend/bin/layer-baseline.txt
@@ -332,8 +332,6 @@ frontend/src/lib/hooks/useFeatureFlag.ts -> frontend/src/lib/logic/featureFlagLo
frontend/src/lib/hooks/useFileSystemLogView.ts -> frontend/src/exporter/exporterViewLogic.ts
frontend/src/lib/hooks/useFileSystemLogView.ts -> frontend/src/models/recentItemsModel.ts
frontend/src/lib/hooks/useKeyboardHotkeys.tsx -> frontend/src/lib/posthog-typed.ts
-frontend/src/lib/hooks/useThemedHtml.ts -> frontend/src/lib/logic/themeLogic.ts
-frontend/src/lib/hooks/useThemedHtml.ts -> frontend/src/scenes/sceneLogic.tsx
frontend/src/lib/integrations/VercelIntegrationSuffix.tsx -> frontend/src/scenes/settings/organization/organizationIntegrationsLogic.ts
frontend/src/lib/lemon-ui/LemonCalendar/LemonCalendar.tsx -> frontend/src/scenes/teamLogic.tsx
frontend/src/lib/lemon-ui/LemonColor/LemonColorButton.tsx -> frontend/src/lib/logic/dataThemeLogic.tsx
diff --git a/frontend/src/exporter/Exporter.tsx b/frontend/src/exporter/Exporter.tsx
index 347b584d2ab9..b35ca30893eb 100644
--- a/frontend/src/exporter/Exporter.tsx
+++ b/frontend/src/exporter/Exporter.tsx
@@ -9,7 +9,6 @@ import { DashboardLoadingState } from '@posthog/products-dashboards/frontend/com
import { Logo } from 'lib/brand'
import { useResizeObserver } from 'lib/hooks/useResizeObserver'
-import { useThemedHtml } from 'lib/hooks/useThemedHtml'
import { LemonMarkdown } from 'lib/lemon-ui/LemonMarkdown'
import { Link } from 'lib/lemon-ui/Link'
import { WrappingLoadingSkeleton } from 'lib/ui/WrappingLoadingSkeleton/WrappingLoadingSkeleton'
@@ -20,6 +19,7 @@ import { teamLogic } from 'scenes/teamLogic'
import { ExporterLogin } from '~/exporter/ExporterLogin'
import { ExportType, ExportedData } from '~/exporter/types'
+import { useThemedHtml } from '~/layout/useThemedHtml'
import { isMetricInsightQuery } from '~/queries/utils'
import { exporterViewLogic } from './exporterViewLogic'
diff --git a/frontend/src/lib/hooks/useThemedHtml.ts b/frontend/src/layout/useThemedHtml.ts
similarity index 100%
rename from frontend/src/lib/hooks/useThemedHtml.ts
rename to frontend/src/layout/useThemedHtml.ts
diff --git a/frontend/src/render-query/RenderQueryApp.tsx b/frontend/src/render-query/RenderQueryApp.tsx
index 24adcd6a1d44..657610321de7 100644
--- a/frontend/src/render-query/RenderQueryApp.tsx
+++ b/frontend/src/render-query/RenderQueryApp.tsx
@@ -2,8 +2,7 @@ import './RenderQuery.scss'
import { useEffect, useState } from 'react'
-import { useThemedHtml } from 'lib/hooks/useThemedHtml'
-
+import { useThemedHtml } from '~/layout/useThemedHtml'
import { Query } from '~/queries/Query/Query'
import { AnyResponseType, Node } from '~/queries/schema/schema-general'
import { QueryContext } from '~/queries/types'
diff --git a/frontend/src/scenes/App.tsx b/frontend/src/scenes/App.tsx
index 1bb3a52c38f1..ee7b8ef23a61 100644
--- a/frontend/src/scenes/App.tsx
+++ b/frontend/src/scenes/App.tsx
@@ -8,7 +8,6 @@ import { PostHogProvider } from '@posthog/react'
import { MOCK_NODE_PROCESS } from 'lib/constants'
import { useCancelAnimationsOnUnmount } from 'lib/hooks/useCancelAnimationsOnUnmount'
-import { useThemedHtml } from 'lib/hooks/useThemedHtml'
import { ToastCloseButton } from 'lib/lemon-ui/LemonToast/LemonToast'
import { SpinnerOverlay } from 'lib/lemon-ui/Spinner/Spinner'
import { autofillReleaseLogic } from 'lib/memory/autofillReleaseLogic'
@@ -24,6 +23,7 @@ import { userLogic } from 'scenes/userLogic'
import { AppLoadError } from '~/layout/AppLoadError'
import { ErrorBoundary } from '~/layout/ErrorBoundary'
import { themeLogic } from '~/layout/navigation-3000/themeLogic'
+import { useThemedHtml } from '~/layout/useThemedHtml'
import { AuthenticatedShellFallback } from './AuthenticatedShellFallback'
import { ChunkLoadErrorBoundary } from './ChunkLoadErrorBoundary'