@bigfishtv/cockpit
Version:
25 lines (21 loc) • 649 B
JavaScript
/**
* @module Reducers/maximumUploadSize
*/
import { MAXIMUM_UPLOAD_SIZE_UPDATED } from '../constants/ActionTypes';
var initialState = null;
/**
* Reducer for storing maxiumum upload size
* @param {Object} state
* @param {Object} action
* @param {String} action.type - has to be MAXIMUM_UPLOAD_SIZE_UPDATED from constants/ActionTypes
* @return {Object} returns state
*/
export default function () {
var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState;
var action = arguments[1];
switch (action.type) {
case MAXIMUM_UPLOAD_SIZE_UPDATED:
return action.size;
}
return state;
}