2017-07-11 17:37:43 +02:00
|
|
|
import * as ActionTypes from '../../../constants';
|
|
|
|
|
2019-07-24 18:55:58 +02: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 17:37:43 +02:00
|
|
|
switch (action.type) {
|
|
|
|
case ActionTypes.SET_ASSETS:
|
2019-07-24 18:55:58 +02:00
|
|
|
return { list: action.assets, totalSize: action.totalSize };
|
2017-07-11 17:37:43 +02:00
|
|
|
default:
|
|
|
|
return state;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
export default assets;
|