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.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/reducers/topology.js b/src/reducers/topology.js
new file mode 100644
index 00000000..caafb7c1
--- /dev/null
+++ b/src/reducers/topology.js
@@ -0,0 +1,10 @@
+import {FETCH_LATEST_DATACENTER_SUCCEEDED} from "../actions/topology";
+
+export function currentDatacenterId(state = -1, action) {
+ switch (action.type) {
+ case FETCH_LATEST_DATACENTER_SUCCEEDED:
+ return action.datacenterId;
+ default:
+ return state;
+ }
+}