mirror of
https://github.com/strapi/strapi.git
synced 2025-08-06 15:53:11 +00:00
20 lines
381 B
JavaScript
20 lines
381 B
JavaScript
![]() |
import { fromJS } from 'immutable';
|
||
|
import {
|
||
|
REGISTER_PLUGIN,
|
||
|
} from './constants';
|
||
|
|
||
|
const initialState = fromJS({
|
||
|
plugins: {},
|
||
|
});
|
||
|
|
||
|
function appReducer(state = initialState, action) {
|
||
|
switch (action.type) {
|
||
|
case REGISTER_PLUGIN:
|
||
|
return state.setIn(['plugins', action.plugin.name], action.plugin);
|
||
|
default:
|
||
|
return state;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
export default appReducer;
|