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