UNPKG

@bigfishtv/cockpit

Version:

24 lines (20 loc) 564 B
/** * @module Reducers/defaultAssetFolder */ import * as ActionTypes from '../constants/ActionTypes'; var initialState = null; /** * Reducer for setting default asset folder id * @param {Object} state * @param {Number} asset folder id * @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 ActionTypes.ASSET_FOLDER_UPDATED: return action.asset_folder_id; } return state; }