diff options
| author | Georgios Andreadis <info@gandreadis.com> | 2020-07-02 18:39:28 +0200 |
|---|---|---|
| committer | Fabian Mastenbroek <mail.fabianm@gmail.com> | 2020-08-24 19:47:21 +0200 |
| commit | f119fc78dda4d1e828dde04f378a63a93e3a0a7e (patch) | |
| tree | bea1eace5d47f21a7ccb835c6a6079bc92e48710 /frontend/src/components/app/map/groups/DatacenterGroup.js | |
| parent | 7f27a6370a0af25e1bf6ff8f46360c6c26c21e0b (diff) | |
Add current progress on frontend port
Diffstat (limited to 'frontend/src/components/app/map/groups/DatacenterGroup.js')
| -rw-r--r-- | frontend/src/components/app/map/groups/DatacenterGroup.js | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/frontend/src/components/app/map/groups/DatacenterGroup.js b/frontend/src/components/app/map/groups/DatacenterGroup.js deleted file mode 100644 index 3d3b9702..00000000 --- a/frontend/src/components/app/map/groups/DatacenterGroup.js +++ /dev/null @@ -1,40 +0,0 @@ -import React from 'react' -import { Group } from 'react-konva' -import GrayContainer from '../../../../containers/app/map/GrayContainer' -import RoomContainer from '../../../../containers/app/map/RoomContainer' -import Shapes from '../../../../shapes/index' - -const DatacenterGroup = ({ datacenter, interactionLevel }) => { - if (!datacenter) { - return <Group/> - } - - if (interactionLevel.mode === 'BUILDING') { - return ( - <Group> - {datacenter.roomIds.map(roomId => ( - <RoomContainer key={roomId} roomId={roomId}/> - ))} - </Group> - ) - } - - return ( - <Group> - {datacenter.roomIds - .filter(roomId => roomId !== interactionLevel.roomId) - .map(roomId => <RoomContainer key={roomId} roomId={roomId}/>)} - {interactionLevel.mode === 'ROOM' ? <GrayContainer/> : null} - {datacenter.roomIds - .filter(roomId => roomId === interactionLevel.roomId) - .map(roomId => <RoomContainer key={roomId} roomId={roomId}/>)} - </Group> - ) -} - -DatacenterGroup.propTypes = { - datacenter: Shapes.Datacenter, - interactionLevel: Shapes.InteractionLevel, -} - -export default DatacenterGroup |
