fix: overlay calendar view for Booker atom (#16642)
* overlay calendar needs to be false when in month_view * fixup
This commit is contained in:
1 parent
32b2e83564
commit
071c899ea6
1 file changed
+7
-5
@@ -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