fix: cal.cache not working (#21044)

* fix: cal.cache not working

* Thanks mrge
This commit is contained in:
Alex van Andel authored and GitHub committed 2025-05-01 00:42:57 +00:00
1 parent c52bbc4be3
commit 55b066c475
2 files changed
+5 -5

No files matched your search

@@ -278,7 +278,7 @@ export const BookerPlatformWrapper = (
const [routingParams, setRoutingParams] = useState<{
routedTeamMemberIds?: number[];
shouldServeCache?: boolean;
_shouldServeCache?: boolean;
skipContactOwner?: boolean;
isBookingDryRun?: boolean;
}>({});
@@ -292,14 +292,14 @@ export const BookerPlatformWrapper = (
const skipContactOwner = searchParams.get("cal.skipContactOwner") === "true";
const _cacheParam = searchParams?.get("cal.cache");
const shouldServeCache = _cacheParam ? _cacheParam === "true" : undefined;
const _shouldServeCache = _cacheParam ? _cacheParam === "true" : undefined;
const isBookingDryRun =
searchParams?.get("cal.isBookingDryRun")?.toLowerCase() === "true" ||
searchParams?.get("cal.sandbox")?.toLowerCase() === "true";
setRoutingParams({
...(skipContactOwner ? { skipContactOwner } : {}),
...(routedTeamMemberIds ? { routedTeamMemberIds } : {}),
...(shouldServeCache ? { shouldServeCache } : {}),
...(_shouldServeCache ? { _shouldServeCache } : {}),
...(isBookingDryRun ? { isBookingDryRun } : {}),
});
}, [routingFormSearchParams]);