From 564c84dade1e2da79864083c6e2db8b52f9b0d52 Mon Sep 17 00:00:00 2001 From: Hariom Balhara Date: Fri, 28 Feb 2025 23:50:46 +0530 Subject: [PATCH] fix: App theme being used in routing-form embed (#19489) * fix wrong theme routing-form embed * fix wrong theme routing-form embed --- .../web/app/(booking-page-wrapper)/layout.tsx | 2 +- apps/web/app/(use-page-wrapper)/layout.tsx | 2 +- apps/web/app/layout.tsx | 40 --- apps/web/app/not-found.tsx | 2 +- apps/web/components/PageWrapperAppDir.tsx | 1 - .../__tests__/getThemeProviderProps.test.ts | 240 ++++++++++++++++++ apps/web/lib/app-providers-app-dir.tsx | 109 +------- apps/web/lib/getThemeProviderProps.ts | 137 ++++++++++ apps/web/lib/how-theming-works.md | 20 ++ .../pages/routing-link/getServerSideProps.ts | 1 - packages/embeds/embed-core/src/embed.ts | 9 +- packages/features/embed/Embed.tsx | 22 +- packages/features/embed/lib/constants.ts | 5 + 13 files changed, 433 insertions(+), 157 deletions(-) create mode 100644 apps/web/lib/__tests__/getThemeProviderProps.test.ts create mode 100644 apps/web/lib/getThemeProviderProps.ts create mode 100644 apps/web/lib/how-theming-works.md diff --git a/apps/web/app/(booking-page-wrapper)/layout.tsx b/apps/web/app/(booking-page-wrapper)/layout.tsx index 0594258a49..b96ea2efac 100644 --- a/apps/web/app/(booking-page-wrapper)/layout.tsx +++ b/apps/web/app/(booking-page-wrapper)/layout.tsx @@ -7,7 +7,7 @@ export default async function BookingPageWrapperLayout({ children }: { children: const nonce = h.get("x-nonce") ?? undefined; return ( - + {children} ); diff --git a/apps/web/app/(use-page-wrapper)/layout.tsx b/apps/web/app/(use-page-wrapper)/layout.tsx index 77307297e0..2fc38abd52 100644 --- a/apps/web/app/(use-page-wrapper)/layout.tsx +++ b/apps/web/app/(use-page-wrapper)/layout.tsx @@ -7,7 +7,7 @@ export default async function PageWrapperLayout({ children }: { children: React. const nonce = h.get("x-nonce") ?? undefined; return ( - + {children} ); diff --git a/apps/web/app/layout.tsx b/apps/web/app/layout.tsx index a178899ac7..3e5545b6c0 100644 --- a/apps/web/app/layout.tsx +++ b/apps/web/app/layout.tsx @@ -78,46 +78,6 @@ export default async function RootLayout({ children }: { children: React.ReactNo }} /> )} -