3bc40df230
* Add: useDeduplicatedSubscription hook * Fix: TS error * Add: components using useDeduplicatedSubscription * Change: Move to useDeduplicatedSubscription * Change: unsubscribe logic to own useEffect * Change: remove file import over package * Fix: TS errors * Fix: private chat not loading * Change: revert changes on queries * Fix: eslint error * Remove: html-webpack-plugin package * Fix: external video * Add: comment about the stringToHash function * Fix: video player showing tools over presentation
41 lines
1.2 KiB
JavaScript
41 lines
1.2 KiB
JavaScript
import React from 'react';
|
|
import { withTracker } from 'meteor/react-meteor-data';
|
|
import { UploadingPresentations } from '/imports/api/presentations';
|
|
import { PresentationUploaderToast } from './component';
|
|
|
|
import {
|
|
EXPORTING_PRESENTATIONS_SUBSCRIPTION,
|
|
} from '/imports/ui/components/whiteboard/queries';
|
|
import useDeduplicatedSubscription from '/imports/ui/core/hooks/useDeduplicatedSubscription';
|
|
|
|
const PresentationUploaderToastContainer = (props) => {
|
|
const { data: presentationData } = useDeduplicatedSubscription(
|
|
EXPORTING_PRESENTATIONS_SUBSCRIPTION,
|
|
);
|
|
const presentations = presentationData?.pres_presentation || [];
|
|
|
|
const convertingPresentations = presentations.filter(
|
|
(p) => !p.uploadCompleted || !!p.uploadErrorMsgKey,
|
|
);
|
|
|
|
return (
|
|
<PresentationUploaderToast
|
|
{
|
|
...{
|
|
presentations,
|
|
convertingPresentations,
|
|
...props,
|
|
}
|
|
}
|
|
/>
|
|
);
|
|
};
|
|
|
|
export default withTracker(() => {
|
|
const uploadingPresentations = UploadingPresentations.find({ $or: [{ 'upload.error': true }, { 'upload.done': false }] }).fetch();
|
|
|
|
return {
|
|
uploadingPresentations,
|
|
};
|
|
})(PresentationUploaderToastContainer);
|