2021-10-17 10:36:14 +02:00
|
|
|
import { createSelector } from 'reselect';
|
|
|
|
|
2021-10-23 04:41:43 +02:00
|
|
|
const selectState = (state) => state.web || {};
|
2021-10-17 10:36:14 +02:00
|
|
|
|
2021-10-23 04:41:43 +02:00
|
|
|
export const selectCurrentUploads = (state) => selectState(state).currentUploads;
|
2021-10-17 10:36:14 +02:00
|
|
|
|
|
|
|
export const selectUploadCount = createSelector(
|
|
|
|
selectCurrentUploads,
|
2021-10-23 04:41:43 +02:00
|
|
|
(currentUploads) => currentUploads && Object.keys(currentUploads).length
|
2021-10-17 10:36:14 +02:00
|
|
|
);
|