2017-07-11 15:37:43 +00:00
|
|
|
import * as ActionTypes from '../../../constants';
|
|
|
|
|
2019-07-24 16:55:58 +00:00
|
|
|
// 1,000,000 bytes in a MB. can't upload if totalSize is bigger than this.
|
|
|
|
const initialState = {
|
|
|
|
list: [],
|
|
|
|
totalSize: 0
|
|
|
|
};
|
|
|
|
|
|
|
|
const assets = (state = initialState, action) => {
|
2017-07-11 15:37:43 +00:00
|
|
|
switch (action.type) {
|
|
|
|
case ActionTypes.SET_ASSETS:
|
2019-07-24 16:55:58 +00:00
|
|
|
return { list: action.assets, totalSize: action.totalSize };
|
2017-07-11 15:37:43 +00:00
|
|
|
default:
|
|
|
|
return state;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
export default assets;
|