Skip to content

Scheduling infrastructure for absolutely everyone.

fix annoying warning due to key spread (#16948)

Benny Joobabb1a3bf71d
diff --git a/apps/web/lib/app-providers-app-dir.tsx b/apps/web/lib/app-providers-app-dir.tsx
index 463db38a700..abfe2aec225 100644
--- a/apps/web/lib/app-providers-app-dir.tsx
+++ b/apps/web/lib/app-providers-app-dir.tsx
@@ -141,10 +141,10 @@ const CalcomThemeProvider = (props: CalcomThemeProps) => {
const embedNamespace = searchParams ? getEmbedNamespace(searchParams) : null;
const isEmbedMode = typeof embedNamespace === "string";
- const themeProviderProps = getThemeProviderProps({ props, isEmbedMode, embedNamespace });
+ const { key, ...themeProviderProps } = getThemeProviderProps({ props, isEmbedMode, embedNamespace });
return (
- <ThemeProvider {...themeProviderProps}>
+ <ThemeProvider key={key} {...themeProviderProps}>
{/* Embed Mode can be detected reliably only on client side here as there can be static generated pages as well which can't determine if it's embed mode at backend */}
{/* color-scheme makes background:transparent not work in iframe which is required by embed. */}
{typeof window !== "undefined" && !isEmbedMode && (
diff --git a/apps/web/lib/app-providers.tsx b/apps/web/lib/app-providers.tsx
index 34975b68f4a..5d794d975c9 100644
--- a/apps/web/lib/app-providers.tsx
+++ b/apps/web/lib/app-providers.tsx
@@ -145,10 +145,10 @@ const CalcomThemeProvider = (props: CalcomThemeProps) => {
const embedNamespace = getEmbedNamespace(props.router.query);
const isEmbedMode = typeof embedNamespace === "string";
- const themeProviderProps = getThemeProviderProps({ props, isEmbedMode, embedNamespace });
+ const { key, ...themeProviderProps } = getThemeProviderProps({ props, isEmbedMode, embedNamespace });
return (
- <ThemeProvider {...themeProviderProps}>
+ <ThemeProvider key={key} {...themeProviderProps}>
{/* Embed Mode can be detected reliably only on client side here as there can be static generated pages as well which can't determine if it's embed mode at backend */}
{/* color-scheme makes background:transparent not work in iframe which is required by embed. */}
{typeof window !== "undefined" && !isEmbedMode && (