feat(SW-718) refactor: optimize rate selection and room scrolling
This commit is contained in:
@@ -193,7 +193,7 @@ export default function Rooms({
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
setTimeout(() => {
|
||||
requestAnimationFrame(() => {
|
||||
const SCROLL_OFFSET = 100
|
||||
const roomElements = document.querySelectorAll(`.${styles.roomContainer}`)
|
||||
const index = selectedRates.findIndex((rate) => rate === undefined)
|
||||
@@ -208,7 +208,7 @@ export default function Rooms({
|
||||
behavior: "smooth",
|
||||
})
|
||||
}
|
||||
}, 0)
|
||||
})
|
||||
}, [selectedRates])
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user