summaryrefslogtreecommitdiffstats
path: root/packages/gitbook-core/src/reducers/config.js
blob: 2ef1ce355dc8d50d4eada1159182fb282d2c4682 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
const ACTION_TYPES = require('../actions/TYPES');
const Config = require('../models/Config');

module.exports = (state, action) => {
    state = Config.create(state);

    switch (action.type) {

    case ACTION_TYPES.PAGE_FETCH_END:
        return Config.create(action.payload.config);

    default:
        return state;

    }
};