fix: overlay calendar view for Booker atom (#16642)
* overlay calendar needs to be false when in month_view * fixup
This commit is contained in:
@@ -381,15 +381,17 @@ export const BookerPlatformWrapper = (
|
||||
});
|
||||
setBookingData(null);
|
||||
}
|
||||
if (isOverlayCalendarEnabled) {
|
||||
localStorage.setItem("overlayCalendarSwitchDefault", "true");
|
||||
} else {
|
||||
localStorage.removeItem("overlayCalendarSwitchDefault");
|
||||
}
|
||||
};
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
if (isOverlayCalendarEnabled && view === "MONTH_VIEW") {
|
||||
localStorage.removeItem("overlayCalendarSwitchDefault");
|
||||
}
|
||||
setIsOverlayCalendarEnabled(Boolean(localStorage?.getItem?.("overlayCalendarSwitchDefault")));
|
||||
}, [view, isOverlayCalendarEnabled]);
|
||||
|
||||
return (
|
||||
<AtomsWrapper>
|
||||
<BookerComponent
|
||||
|
||||
Reference in New Issue
Block a user