2021-05-18 04:25:07 +08:00
|
|
|
import React, { useContext } from 'react';
|
2020-01-30 02:36:17 +08:00
|
|
|
import { withTracker } from 'meteor/react-meteor-data';
|
|
|
|
import { injectIntl } from 'react-intl';
|
|
|
|
import QuickPollDropdown from './component';
|
2021-05-18 04:25:07 +08:00
|
|
|
import { NLayoutContext } from '../../layout/context/context';
|
2021-05-27 01:52:55 +08:00
|
|
|
import PollService from '/imports/ui/components/poll/service';
|
2020-01-30 02:36:17 +08:00
|
|
|
|
2021-05-18 04:25:07 +08:00
|
|
|
const QuickPollDropdownContainer = (props) => {
|
|
|
|
const newLayoutContext = useContext(NLayoutContext);
|
|
|
|
const { newLayoutContextDispatch } = newLayoutContext;
|
|
|
|
return <QuickPollDropdown {...{ newLayoutContextDispatch, ...props }} />;
|
|
|
|
};
|
2020-01-30 02:36:17 +08:00
|
|
|
|
|
|
|
export default withTracker(() => ({
|
|
|
|
activePoll: Session.get('pollInitiated') || false,
|
2021-05-27 01:52:55 +08:00
|
|
|
pollTypes: PollService.pollTypes,
|
2020-01-30 02:36:17 +08:00
|
|
|
}))(injectIntl(QuickPollDropdownContainer));
|