HotFix - Background not being transparent for [user]/[type] in embed (#3121)

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
This commit is contained in:
Hariom Balharaandkodiakhq[bot] authored and GitHub committed 2022-06-21 09:38:59 +00:00
1 parent dfc6373bb4
commit 993bd18a73
4 files changed
+28 -8

No files matched your search

@@ -286,7 +286,7 @@ const useDateSelected = ({ timeZone }: { timeZone?: string }) => {
}
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, []);
}, [router.query.date]);
const setSelectedDate = (newDate: Date) => {
router.replace(
@@ -314,6 +314,7 @@ const AvailabilityPage = ({ profile, eventType }: Props) => {
const { contracts } = useContracts();
const availabilityDatePickerEmbedStyles = useEmbedStyles("availabilityDatePicker");
const shouldAlignCentrallyInEmbed = useEmbedNonStylesConfig("align") !== "left";
const shouldAlignCentrally = !isEmbed || shouldAlignCentrallyInEmbed;
const isBackgroundTransparent = useIsBackgroundTransparent();
@@ -350,6 +351,10 @@ const AvailabilityPage = ({ profile, eventType }: Props) => {
}
}, [telemetry]);
// Avoid embed styling flicker. Till embed status is confirmed, don't render.
if (isEmbed === null) {
return null;
}
// Recurring event sidebar requires more space
const maxWidth = isAvailableTimesVisible
? recurringEventCount