Merged in fix/bw-fixes (pull request #3481)

Fix/bw fixes

* fix(bookingwidget): fixed some mobile issues with the booking widget

* fixed dual scroll and hidden button in mobile guests & rooms picker

* fixed button colors

* fixed mobile search button position

* Remove scroll lock
This commit is contained in:
Linus Flood
2026-01-23 08:05:49 +00:00
parent 64d81c6ede
commit ec78befb50
8 changed files with 9 additions and 29 deletions

View File

@@ -8,7 +8,6 @@ import { useMediaQuery } from "usehooks-ts"
import { longDateFormat } from "@scandic-hotels/common/constants/dateFormats"
import { dt } from "@scandic-hotels/common/dt"
import { useScrollLock } from "@scandic-hotels/common/hooks/useScrollLock"
import { Typography } from "@scandic-hotels/design-system/Typography"
import useLang from "../../../hooks/useLang"
@@ -31,9 +30,6 @@ export default function DatePickerForm({
const checkIsDesktop = useMediaQuery("(min-width: 1367px)")
const [isDesktop, setIsDesktop] = useState(true)
const { lockScroll, unlockScroll } = useScrollLock({
autoLock: false,
})
const [isOpen, setIsOpen] = useState(false)
const selectedDate = useWatch({ name })
const { setValue } = useFormContext()
@@ -50,8 +46,7 @@ export default function DatePickerForm({
)
}
setIsOpen(false)
unlockScroll()
}, [name, setValue, selectedDate, unlockScroll])
}, [name, setValue, selectedDate])
const { overlayProps, underlayProps } = useOverlay(
{
@@ -168,11 +163,6 @@ export default function DatePickerForm({
ariaLabelledBy={ariaLabelledBy}
onPress={() => {
setIsOpen((prev) => !prev)
if (!isOpen) {
lockScroll()
} else {
unlockScroll()
}
}}
selectedFromDate={selectedFromDate}
selectedToDate={selectedToDate}