diff options
| author | Georgios Andreadis <g.andreadis@student.tudelft.nl> | 2017-08-31 17:59:51 +0200 |
|---|---|---|
| committer | Georgios Andreadis <g.andreadis@student.tudelft.nl> | 2017-09-23 10:05:50 +0200 |
| commit | 3f736cd3db63f106eac02f220477b4a0f3b0eceb (patch) | |
| tree | 80afa73f8c4d281b2fccba8ad2baa7c10f7e7e84 /src/reducers/topology.js | |
| parent | b17f1d8cb4815f57a4b7043cc91b867ec3cbc867 (diff) | |
Implement room creation
Diffstat (limited to 'src/reducers/topology.js')
| -rw-r--r-- | src/reducers/topology.js | 19 |
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; + } +} |
