import { createSelector } from "reselect";

const selectPhotosState = (state) => state.photos;

export const selectPhotos = createSelector(
  [selectPhotosState],
  (photos) => photos.photos
);
export const selectUploadInProgress = createSelector(
  [selectPhotosState],
  (photos) => photos.uploadInProgress
);
export const selectUploadError = createSelector(
  [selectPhotosState],
  (photos) => photos.uploadError
);

export const selectUploadProgress = createSelector(
  [selectPhotosState],
  (photos) => photos.progress
);