summaryrefslogtreecommitdiff
path: root/src/reducers/modals.js
diff options
context:
space:
mode:
authorGeorgios Andreadis <g.andreadis@student.tudelft.nl>2017-09-01 16:42:13 +0200
committerGeorgios Andreadis <g.andreadis@student.tudelft.nl>2017-09-23 10:05:56 +0200
commit17ae0a3fafd806a5a533bf1d51a3ac708a8cf978 (patch)
treec3687bd08891ef3698f4773e44a6920856229dfe /src/reducers/modals.js
parenteea529f57e3ee39d2f492062688b2848ced0a747 (diff)
Implement room name edit
Diffstat (limited to 'src/reducers/modals.js')
-rw-r--r--src/reducers/modals.js17
1 files changed, 15 insertions, 2 deletions
diff --git a/src/reducers/modals.js b/src/reducers/modals.js
index e74b66b9..1786bb87 100644
--- a/src/reducers/modals.js
+++ b/src/reducers/modals.js
@@ -1,6 +1,7 @@
import {combineReducers} from "redux";
-import {CLOSE_DELETE_PROFILE_MODAL, OPEN_DELETE_PROFILE_MODAL} from "../actions/profile";
-import {CLOSE_NEW_SIMULATION_MODAL, OPEN_NEW_SIMULATION_MODAL} from "../actions/simulations";
+import {CLOSE_DELETE_PROFILE_MODAL, OPEN_DELETE_PROFILE_MODAL} from "../actions/modals/profile";
+import {CLOSE_NEW_SIMULATION_MODAL, OPEN_NEW_SIMULATION_MODAL} from "../actions/modals/simulations";
+import {CLOSE_EDIT_ROOM_NAME_MODAL, OPEN_EDIT_ROOM_NAME_MODAL} from "../actions/modals/topology";
function newSimulationModalVisible(state = false, action) {
switch (action.type) {
@@ -24,7 +25,19 @@ function deleteProfileModalVisible(state = false, action) {
}
}
+function editRoomNameModalVisible(state = false, action) {
+ switch (action.type) {
+ case OPEN_EDIT_ROOM_NAME_MODAL:
+ return true;
+ case CLOSE_EDIT_ROOM_NAME_MODAL:
+ return false;
+ default:
+ return state;
+ }
+}
+
export const modals = combineReducers({
newSimulationModalVisible,
deleteProfileModalVisible,
+ editRoomNameModalVisible,
});