feat(SW-2116): avoid passing entire booking object to Room client component
This commit is contained in:
committed by
Michael Zetterberg
parent
a839d05e09
commit
7eeb0bbcac
@@ -78,14 +78,19 @@ export function LinkedReservation({
|
||||
if (!data?.room) {
|
||||
return <Retry handleRefetch={refetch} />
|
||||
}
|
||||
|
||||
const { booking, room } = data
|
||||
return (
|
||||
<Room
|
||||
booking={data.booking}
|
||||
checkInDate={booking.checkInDate}
|
||||
checkOutDate={booking.checkOutDate}
|
||||
checkInTime={checkInTime}
|
||||
checkOutTime={checkOutTime}
|
||||
img={data.room.images[0]}
|
||||
roomName={data.room.name}
|
||||
confirmationNumber={booking.confirmationNumber}
|
||||
guest={booking.guest}
|
||||
guaranteeInfo={booking.guaranteeInfo}
|
||||
img={room.images[0]}
|
||||
rateDefinition={booking.rateDefinition}
|
||||
roomName={room.name}
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user