Don't memoize unnecessarily
This commit is contained in:
committed by
Erik Tiekstra
parent
fbdfeafcb5
commit
eb0494c2a2
@@ -50,15 +50,12 @@ export default function MobileToggleButton({
|
|||||||
setHasMounted(true)
|
setHasMounted(true)
|
||||||
}, [])
|
}, [])
|
||||||
|
|
||||||
const locationAndDateIsSet = useMemo(
|
|
||||||
() => parsedLocation && d,
|
|
||||||
[parsedLocation, d]
|
|
||||||
)
|
|
||||||
|
|
||||||
if (!hasMounted) {
|
if (!hasMounted) {
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const locationAndDateIsSet = parsedLocation && d
|
||||||
|
|
||||||
const totalRooms = rooms.length
|
const totalRooms = rooms.length
|
||||||
const totalAdults = rooms.reduce((acc, room) => {
|
const totalAdults = rooms.reduce((acc, room) => {
|
||||||
if (room.adults) {
|
if (room.adults) {
|
||||||
|
|||||||
Reference in New Issue
Block a user