summaryrefslogtreecommitdiff
path: root/src/reducers/topology.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/reducers/topology.js')
-rw-r--r--src/reducers/topology.js19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/reducers/topology.js b/src/reducers/topology.js
index caafb7c1..c8690816 100644
--- a/src/reducers/topology.js
+++ b/src/reducers/topology.js
@@ -1,4 +1,9 @@
-import {FETCH_LATEST_DATACENTER_SUCCEEDED} from "../actions/topology";
+import {
+ CANCEL_NEW_ROOM_CONSTRUCTION_SUCCEEDED,
+ FETCH_LATEST_DATACENTER_SUCCEEDED,
+ FINISH_NEW_ROOM_CONSTRUCTION,
+ START_NEW_ROOM_CONSTRUCTION_SUCCEEDED
+} from "../actions/topology";
export function currentDatacenterId(state = -1, action) {
switch (action.type) {
@@ -8,3 +13,15 @@ export function currentDatacenterId(state = -1, action) {
return state;
}
}
+
+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:
+ return -1;
+ default:
+ return state;
+ }
+}