Files
imexmobile/redux/photos/photos.reducer.js
2025-10-08 16:20:23 -07:00

25 lines
475 B
JavaScript

import PhotosActionTypes from "./photos.types";
const INITIAL_STATE = {
photos: [],
uploadInProgress: false,
uploadError: null,
};
const photosReducer = (state = INITIAL_STATE, action) => {
switch (action.type) {
case PhotosActionTypes.MEDIA_UPLOAD_START:
return {
...state,
photos: action.payload,
uploadInProgress: true,
uploadError: null,
};
default:
return state;
}
};
export default photosReducer;