diff --git a/packages/features/bookings/Booker/components/Header.tsx b/packages/features/bookings/Booker/components/Header.tsx
index eb7dc45f02..7f92d8a8a5 100644
--- a/packages/features/bookings/Booker/components/Header.tsx
+++ b/packages/features/bookings/Booker/components/Header.tsx
@@ -55,13 +55,6 @@ export function Header({
if (isMobile || !enabledLayouts) return null;
- // Only reason we create this component, is because it is used 3 times in this component,
- // and this way we can't forget to update one of the props in all places :)
- const LayoutToggleWithData = () => {
- return enabledLayouts.length <= 1 ? null : (
-
- );
- };
// In month view we only show the layout toggle.
if (isMonthView) {
return (
@@ -78,7 +71,11 @@ export function Header({
) : (
renderOverlay?.()
)}
-
+
);
}
@@ -140,7 +137,11 @@ export function Header({
{renderOverlay?.()}
-
+
{/*
This second layout toggle is hidden, but needed to reserve the correct spot in the DIV
@@ -150,7 +151,11 @@ export function Header({
while it actually already was on place. That's why we have this element twice.
*/}
-
+
@@ -198,3 +203,17 @@ const LayoutToggle = ({
return ;
};
+
+const LayoutToggleWithData = ({
+ enabledLayouts,
+ onLayoutToggle,
+ layout,
+}: {
+ enabledLayouts: BookerLayouts[];
+ onLayoutToggle: (layout: string) => void;
+ layout: string;
+}) => {
+ return enabledLayouts.length <= 1 ? null : (
+
+ );
+};