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)
|
||||
}, [])
|
||||
|
||||
const locationAndDateIsSet = useMemo(
|
||||
() => parsedLocation && d,
|
||||
[parsedLocation, d]
|
||||
)
|
||||
|
||||
if (!hasMounted) {
|
||||
return null
|
||||
}
|
||||
|
||||
const locationAndDateIsSet = parsedLocation && d
|
||||
|
||||
const totalRooms = rooms.length
|
||||
const totalAdults = rooms.reduce((acc, room) => {
|
||||
if (room.adults) {
|
||||
|
||||
Reference in New Issue
Block a user