From de8f12d74faef5fa3f9e38d1340948cab2d06ea3 Mon Sep 17 00:00:00 2001 From: Georgios Andreadis Date: Wed, 1 Jul 2020 13:33:31 +0200 Subject: Manually generate IDs --- .../topology/building/BuildingSidebarComponent.js | 33 ++++++------- .../building/NewRoomConstructionComponent.js | 54 +++++++++++----------- 2 files changed, 44 insertions(+), 43 deletions(-) (limited to 'frontend/src/components/app/sidebars/topology/building') diff --git a/frontend/src/components/app/sidebars/topology/building/BuildingSidebarComponent.js b/frontend/src/components/app/sidebars/topology/building/BuildingSidebarComponent.js index f16c19f0..00965c18 100644 --- a/frontend/src/components/app/sidebars/topology/building/BuildingSidebarComponent.js +++ b/frontend/src/components/app/sidebars/topology/building/BuildingSidebarComponent.js @@ -1,20 +1,21 @@ -import React from "react"; -import NewRoomConstructionContainer from "../../../../../containers/app/sidebars/topology/building/NewRoomConstructionContainer"; +import React from 'react' +import NewRoomConstructionContainer + from '../../../../../containers/app/sidebars/topology/building/NewRoomConstructionContainer' const BuildingSidebarComponent = ({ inSimulation }) => { - return ( -
-

Building

- {inSimulation ? ( -
- - Click on individual rooms to see their stats! + return ( +
+

Building

+ {inSimulation ? ( +
+ + Click on individual rooms to see their stats! +
+ ) : ( + + )}
- ) : ( - - )} -
- ); -}; + ) +} -export default BuildingSidebarComponent; +export default BuildingSidebarComponent diff --git a/frontend/src/components/app/sidebars/topology/building/NewRoomConstructionComponent.js b/frontend/src/components/app/sidebars/topology/building/NewRoomConstructionComponent.js index 7b049642..362483bf 100644 --- a/frontend/src/components/app/sidebars/topology/building/NewRoomConstructionComponent.js +++ b/frontend/src/components/app/sidebars/topology/building/NewRoomConstructionComponent.js @@ -1,31 +1,31 @@ -import React from "react"; +import React from 'react' const NewRoomConstructionComponent = ({ - onStart, - onFinish, - onCancel, - currentRoomInConstruction -}) => { - if (currentRoomInConstruction === -1) { + onStart, + onFinish, + onCancel, + currentRoomInConstruction, + }) => { + if (currentRoomInConstruction === -1) { + return ( +
+ + Construct a new room +
+ ) + } return ( -
- - Construct a new room -
- ); - } - return ( -
-
- - Finalize new room -
-
- - Cancel construction -
-
- ); -}; +
+
+ + Finalize new room +
+
+ + Cancel construction +
+
+ ) +} -export default NewRoomConstructionComponent; +export default NewRoomConstructionComponent -- cgit v1.2.3