import { CHANGE_CONTAINER_HEIGHT, CHANGE_CONTAINER_WIDTH } from '../actions/composition.actions';

const initState = { containerHeight: 0, containerWidth: 0 };

function compositionReducers(state = initState, action) {
  switch (action.type) {

    case CHANGE_CONTAINER_HEIGHT:
      return { ...state, containerHeight: action.containerHeight };

    case CHANGE_CONTAINER_WIDTH:
      return { ...state, containerWidth: action.containerWidth };
    default:
      return state;
  }
}

export default compositionReducers;
