diff options
| author | Georgios Andreadis <g.andreadis@student.tudelft.nl> | 2017-08-31 17:59:51 +0200 |
|---|---|---|
| committer | Georgios Andreadis <g.andreadis@student.tudelft.nl> | 2017-09-23 10:05:50 +0200 |
| commit | 3f736cd3db63f106eac02f220477b4a0f3b0eceb (patch) | |
| tree | 80afa73f8c4d281b2fccba8ad2baa7c10f7e7e84 /src/components/map/groups/DatacenterGroup.js | |
| parent | b17f1d8cb4815f57a4b7043cc91b867ec3cbc867 (diff) | |
Implement room creation
Diffstat (limited to 'src/components/map/groups/DatacenterGroup.js')
| -rw-r--r-- | src/components/map/groups/DatacenterGroup.js | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/components/map/groups/DatacenterGroup.js b/src/components/map/groups/DatacenterGroup.js index 2f4dc2eb..0830ac4e 100644 --- a/src/components/map/groups/DatacenterGroup.js +++ b/src/components/map/groups/DatacenterGroup.js @@ -12,8 +12,8 @@ const DatacenterGroup = ({datacenter, interactionLevel}) => { if (interactionLevel.mode === "BUILDING") { return ( <Group> - {datacenter.rooms.map(room => ( - <RoomContainer key={room.id} room={room}/> + {datacenter.roomIds.map(roomId => ( + <RoomContainer key={roomId} roomId={roomId}/> ))} </Group> ); @@ -21,14 +21,14 @@ const DatacenterGroup = ({datacenter, interactionLevel}) => { return ( <Group> - {datacenter.rooms - .filter(room => room.id !== interactionLevel.roomId) - .map(room => <RoomContainer key={room.id} room={room}/>) + {datacenter.roomIds + .filter(roomId => roomId !== interactionLevel.roomId) + .map(roomId => <RoomContainer key={roomId} roomId={roomId}/>) } {interactionLevel.mode === "ROOM" ? <GrayContainer/> : null} - {datacenter.rooms - .filter(room => room.id === interactionLevel.roomId) - .map(room => <RoomContainer key={room.id} room={room}/>) + {datacenter.roomIds + .filter(roomId => roomId === interactionLevel.roomId) + .map(roomId => <RoomContainer key={roomId} roomId={roomId}/>) } </Group> ); |
