summaryrefslogtreecommitdiff
path: root/src/components/sidebars/topology/machine/UnitListComponent.js
diff options
context:
space:
mode:
authorGeorgios Andreadis <g.andreadis@student.tudelft.nl>2017-09-21 16:07:12 +0200
committerGeorgios Andreadis <g.andreadis@student.tudelft.nl>2017-09-23 10:06:05 +0200
commit19f1e6db285d0bb8a96d2cea9c7f3a543692b81a (patch)
tree6c4aeea3bd174c4675bb90fbcdbc4f70136058d3 /src/components/sidebars/topology/machine/UnitListComponent.js
parent5020d7c293beb08699897e003525059396c16424 (diff)
Hide all construction elements in simulation
Diffstat (limited to 'src/components/sidebars/topology/machine/UnitListComponent.js')
-rw-r--r--src/components/sidebars/topology/machine/UnitListComponent.js7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/components/sidebars/topology/machine/UnitListComponent.js b/src/components/sidebars/topology/machine/UnitListComponent.js
index 288d1428..307edc0a 100644
--- a/src/components/sidebars/topology/machine/UnitListComponent.js
+++ b/src/components/sidebars/topology/machine/UnitListComponent.js
@@ -1,14 +1,17 @@
import React from "react";
import UnitContainer from "../../../../containers/sidebars/topology/machine/UnitContainer";
-const UnitListComponent = ({unitType, unitIds}) => (
+const UnitListComponent = ({unitType, unitIds, inSimulation}) => (
<ul className="list-group mt-1">
{unitIds.length !== 0 ?
unitIds.map((unitId, index) => (
<UnitContainer unitType={unitType} unitId={unitId} index={index} key={index}/>
)) :
<div className="alert alert-info">
- <strong>No units...</strong> Add some with the menu above!
+ {inSimulation ?
+ <strong>No units of this type in this machine</strong> :
+ <span><strong>No units...</strong> Add some with the menu above!</span>
+ }
</div>
}
</ul>