Handle acme.cal.local root path (#20981)

This commit is contained in:
Hariom Balhara authored and GitHub committed 2025-04-26 08:35:23 -03:00
1 parent 6f4e51b859
commit 6ebf0db389
2 files changed
+10

No files matched your search

@@ -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", () => {
+5
View File
@@ -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: