summaryrefslogtreecommitdiff
path: root/src/reducers/construction-mode.js
diff options
context:
space:
mode:
authorGeorgios Andreadis <G.Andreadis@student.tudelft.nl>2017-10-04 23:23:09 +0200
committerGitHub <noreply@github.com>2017-10-04 23:23:09 +0200
commitfcaaae65d34003874c76e0c01134dedf94248e09 (patch)
tree2aae1422168651e832a1904623f6f5b100fc17ec /src/reducers/construction-mode.js
parent0a62dfb55c5700013d42a589b930c7448e5bff71 (diff)
parent606d1de0be09f3597165248f65d54e158a13860c (diff)
Merge pull request #42 from atlarge-research/auto-reformat
Standardize code format
Diffstat (limited to 'src/reducers/construction-mode.js')
-rw-r--r--src/reducers/construction-mode.js57
1 files changed, 30 insertions, 27 deletions
diff --git a/src/reducers/construction-mode.js b/src/reducers/construction-mode.js
index e97c817e..4778bd44 100644
--- a/src/reducers/construction-mode.js
+++ b/src/reducers/construction-mode.js
@@ -1,38 +1,41 @@
-import {combineReducers} from "redux";
-import {OPEN_EXPERIMENT_SUCCEEDED} from "../actions/experiments";
+import { combineReducers } from "redux";
+import { OPEN_EXPERIMENT_SUCCEEDED } from "../actions/experiments";
import {
- CANCEL_NEW_ROOM_CONSTRUCTION_SUCCEEDED,
- FINISH_NEW_ROOM_CONSTRUCTION,
- START_NEW_ROOM_CONSTRUCTION_SUCCEEDED
+ CANCEL_NEW_ROOM_CONSTRUCTION_SUCCEEDED,
+ FINISH_NEW_ROOM_CONSTRUCTION,
+ START_NEW_ROOM_CONSTRUCTION_SUCCEEDED
} from "../actions/topology/building";
-import {START_RACK_CONSTRUCTION, STOP_RACK_CONSTRUCTION} from "../actions/topology/room";
+import {
+ START_RACK_CONSTRUCTION,
+ STOP_RACK_CONSTRUCTION
+} from "../actions/topology/room";
export function currentRoomInConstruction(state = -1, action) {
- switch (action.type) {
- case START_NEW_ROOM_CONSTRUCTION_SUCCEEDED:
- return action.roomId;
- case CANCEL_NEW_ROOM_CONSTRUCTION_SUCCEEDED:
- case FINISH_NEW_ROOM_CONSTRUCTION:
- case OPEN_EXPERIMENT_SUCCEEDED:
- return -1;
- default:
- return state;
- }
+ switch (action.type) {
+ case START_NEW_ROOM_CONSTRUCTION_SUCCEEDED:
+ return action.roomId;
+ case CANCEL_NEW_ROOM_CONSTRUCTION_SUCCEEDED:
+ case FINISH_NEW_ROOM_CONSTRUCTION:
+ case OPEN_EXPERIMENT_SUCCEEDED:
+ return -1;
+ default:
+ return state;
+ }
}
export function inRackConstructionMode(state = false, action) {
- switch (action.type) {
- case START_RACK_CONSTRUCTION:
- return true;
- case STOP_RACK_CONSTRUCTION:
- case OPEN_EXPERIMENT_SUCCEEDED:
- return false;
- default:
- return state;
- }
+ switch (action.type) {
+ case START_RACK_CONSTRUCTION:
+ return true;
+ case STOP_RACK_CONSTRUCTION:
+ case OPEN_EXPERIMENT_SUCCEEDED:
+ return false;
+ default:
+ return state;
+ }
}
export const construction = combineReducers({
- currentRoomInConstruction,
- inRackConstructionMode,
+ currentRoomInConstruction,
+ inRackConstructionMode
});