summaryrefslogtreecommitdiff
path: root/src/components/map/groups/DatacenterGroup.js
blob: d7e349be925dae8cbd03e2d6364bb8a3a540d90f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import React from "react";
import {Group} from "react-konva";
import Shapes from "../../../shapes/index";
import RoomGroup from "./RoomGroup";

const DatacenterGroup = ({datacenter}) => {
    if (!datacenter) {
        return <Group/>;
    }
    return (
        <Group>
            {datacenter.rooms.map(room => (
                <RoomGroup key={room.id} room={room}/>
            ))}
        </Group>
    );
};

DatacenterGroup.propTypes = {
    datacenter: Shapes.Datacenter,
};

export default DatacenterGroup;