Scheduling infrastructure for absolutely everyone.
Handle acme.cal.local root path (#20981)
Hariom Balhara6ebf0db389a9
diff --git a/apps/web/lib/__tests__/getThemeProviderProps.test.ts b/apps/web/lib/__tests__/getThemeProviderProps.test.tsindex 09ccbfbd82f..9b9dedca38b 100644--- a/apps/web/lib/__tests__/getThemeProviderProps.test.ts+++ b/apps/web/lib/__tests__/getThemeProviderProps.test.ts@@ -195,6 +195,11 @@ describe("getUniqueIdentifierForBookingPage", () => {const result = getUniqueIdentifierForBookingPage({ pathname: path });expect(result).toBe(expected);});++ it("should return / for root path", () => {+ const result = getUniqueIdentifierForBookingPage({ pathname: "/" });+ expect(result).toBe("/");+ });});describe("Team Pages", () => {diff --git a/apps/web/lib/getThemeProviderProps.ts b/apps/web/lib/getThemeProviderProps.tsindex ac17ffe2569..1d032a576c4 100644--- a/apps/web/lib/getThemeProviderProps.ts+++ b/apps/web/lib/getThemeProviderProps.ts@@ -16,6 +16,11 @@ const enum ThemeSupport {* The theme stays same for same identifier.*/export function getUniqueIdentifierForBookingPage({ pathname }: { pathname: string }) {+ if (pathname === "/") {+ // For Org domains, we could have a booking page at root path too, so we use '/' as identifier+ // As localStorage isn't shared for different org domains, it's safe to use '/' as identifier+ return "/";+ }const pathTokens = pathname.split("/").slice(1);// If it is a booking page then it could be one of the following: