summaryrefslogtreecommitdiffstats
path: root/packages/gitbook-core/src/reducers/config.js
diff options
context:
space:
mode:
Diffstat (limited to 'packages/gitbook-core/src/reducers/config.js')
-rw-r--r--packages/gitbook-core/src/reducers/config.js15
1 files changed, 15 insertions, 0 deletions
diff --git a/packages/gitbook-core/src/reducers/config.js b/packages/gitbook-core/src/reducers/config.js
new file mode 100644
index 0000000..a49c602
--- /dev/null
+++ b/packages/gitbook-core/src/reducers/config.js
@@ -0,0 +1,15 @@
+const { fromJS } = require('immutable');
+const ACTION_TYPES = require('../actions/TYPES');
+
+module.exports = (state, action) => {
+ state = fromJS(state);
+ switch (action.type) {
+
+ case ACTION_TYPES.PAGE_FETCH_END:
+ return fromJS(action.payload.config);
+
+ default:
+ return state;
+
+ }
+};