themes.reducers.js 397 B

12345678910111213141516171819
  1. import { CHANGE_THEME } from '../actions/actions';
  2. const initialState = {
  3. name: ''
  4. }
  5. const themesReducer = (state = initialState, action) => {
  6. switch (action.type) {
  7. case CHANGE_THEME:
  8. return {
  9. ...state,
  10. name: action.name
  11. }
  12. default:
  13. return state;
  14. }
  15. }
  16. export default themesReducer;