From f06410fa902d5b984dbf1d724f1f86af16a17301 Mon Sep 17 00:00:00 2001 From: fairlighteth <31534717+fairlighteth@users.noreply.github.com> Date: Fri, 7 Feb 2025 16:04:54 +0000 Subject: [PATCH] refactor(theme): remove widget mode flags from ThemeProvider --- apps/explorer/src/theme/ThemeProvider.tsx | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/apps/explorer/src/theme/ThemeProvider.tsx b/apps/explorer/src/theme/ThemeProvider.tsx index 37a9cf628a..59aeade69f 100644 --- a/apps/explorer/src/theme/ThemeProvider.tsx +++ b/apps/explorer/src/theme/ThemeProvider.tsx @@ -1,6 +1,5 @@ import React, { PropsWithChildren, useMemo } from 'react' -import { isIframe, isInjectedWidget } from '@cowprotocol/common-utils' import { baseTheme } from '@cowprotocol/ui' // eslint-disable-next-line no-restricted-imports @@ -11,16 +10,6 @@ import { getFonts, getThemePalette } from './styles' import { useThemeMode } from '../hooks/useThemeManager' -// These values are static and don't change during runtime -const isWidget = isInjectedWidget() -const widgetMode = { - isWidget, - isIframe: isIframe(), - // TODO: isInjectedWidgetMode is deprecated, use isWidget instead - // This alias is kept for backward compatibility with styled components - isInjectedWidgetMode: isWidget, -} - export const ThemeProvider = ({ children }: PropsWithChildren) => { const mode = useThemeMode() @@ -33,8 +22,6 @@ export const ThemeProvider = ({ children }: PropsWithChildren) => { // Compute the app colour pallette using the passed in themeMode ...themePalette, ...fontPalette, - // Add widget mode flags - ...widgetMode, } return computedTheme