diff --git a/packages/features/bookings/Booker/components/Header.tsx b/packages/features/bookings/Booker/components/Header.tsx index 3eb9c291c6..3b380e6c8f 100644 --- a/packages/features/bookings/Booker/components/Header.tsx +++ b/packages/features/bookings/Booker/components/Header.tsx @@ -121,11 +121,7 @@ const LayoutToggle = ({ const isEmbed = typeof window !== "undefined" && window?.isEmbed?.(); const { t } = useLocale(); - // We don't want to show the layout toggle in embed mode as of now as it doesn't look rightly placed when embedded. - // There is a Embed API to control the layout toggle from outside of the iframe. - if (isEmbed) { - return null; - } + const layoutOptions = useMemo(() => { return [ { @@ -146,5 +142,11 @@ const LayoutToggle = ({ ].filter((layout) => enabledLayouts?.includes(layout.value as BookerLayouts)); }, [t, enabledLayouts]); + // We don't want to show the layout toggle in embed mode as of now as it doesn't look rightly placed when embedded. + // There is a Embed API to control the layout toggle from outside of the iframe. + if (isEmbed) { + return null; + } + return ; };