Added photos reducer.

This commit is contained in:
Patrick Fic
2020-11-12 15:47:47 -08:00
parent e2e6f0b510
commit e31f621a8f
12 changed files with 192 additions and 78 deletions

View File

@@ -0,0 +1,24 @@
import PhotosActionTypes from "./photos.types";
export const addPhoto = (photo) => ({
type: PhotosActionTypes.ADD_PHOTO,
payload: photo,
});
export const removePhotos = (photoIds) => ({
type: PhotosActionTypes.REMOVE_PHOTOS,
payload: photoIds,
});
export const removeAllPhotos = () => ({
type: PhotosActionTypes.REMOVE_ALL_PHOTOS,
});
export const uploadAllPhotos = () => ({
type: PhotosActionTypes.UPLOAD_ALL_PHOTOS_START,
});
export const uploadSelectedPhotos = (photoIds) => ({
type: PhotosActionTypes.UPLOAD_SELECTED_PHOTOS_START,
payload: photoIds,
});