2021-05-18 04:25:07 +08:00
|
|
|
import React, { useContext } from 'react';
|
2020-04-02 06:54:47 +08:00
|
|
|
import { withTracker } from 'meteor/react-meteor-data';
|
|
|
|
import Presentations from '/imports/api/presentations';
|
|
|
|
import PresentationUploaderService from '/imports/ui/components/presentation/presentation-uploader/service';
|
|
|
|
import PresentationPodService from '/imports/ui/components/presentation-pod/service';
|
|
|
|
import ActionsDropdown from './component';
|
2021-05-18 04:25:07 +08:00
|
|
|
import { NLayoutContext } from '../../layout/context/context';
|
|
|
|
|
|
|
|
const ActionsDropdownContainer = (props) => {
|
|
|
|
const newLayoutContext = useContext(NLayoutContext);
|
2021-05-19 22:51:31 +08:00
|
|
|
const { newLayoutContextState, newLayoutContextDispatch } = newLayoutContext;
|
|
|
|
const { input } = newLayoutContextState;
|
|
|
|
const { sidebarContent, sidebarNavigation } = input;
|
|
|
|
|
|
|
|
return (
|
|
|
|
<ActionsDropdown {...{
|
|
|
|
newLayoutContextDispatch,
|
|
|
|
sidebarContent,
|
|
|
|
sidebarNavigation,
|
|
|
|
...props,
|
|
|
|
}}
|
|
|
|
/>
|
|
|
|
);
|
2021-05-18 04:25:07 +08:00
|
|
|
};
|
2020-04-02 06:54:47 +08:00
|
|
|
|
|
|
|
export default withTracker(() => {
|
|
|
|
const presentations = Presentations.find({ 'conversion.done': true }).fetch();
|
|
|
|
return ({
|
|
|
|
presentations,
|
2021-05-12 22:07:18 +08:00
|
|
|
isDropdownOpen: Session.get('dropdownOpen'),
|
2020-04-02 06:54:47 +08:00
|
|
|
setPresentation: PresentationUploaderService.setPresentation,
|
|
|
|
podIds: PresentationPodService.getPresentationPodIds(),
|
|
|
|
});
|
2021-05-18 04:25:07 +08:00
|
|
|
})(ActionsDropdownContainer);
|