fix: quick-polls error after merge

This commit is contained in:
germanocaumo 2021-06-17 13:02:04 +00:00
parent 92af5c789b
commit 77dc1d603d

View File

@ -42,7 +42,20 @@ const propTypes = {
amIPresenter: PropTypes.bool.isRequired,
};
const getAvailableQuickPolls = (slideId, parsedSlides, startPoll, pollTypes) => {
const handleClickQuickPoll = (newLayoutContextDispatch) => {
newLayoutContextDispatch({
type: ACTIONS.SET_SIDEBAR_CONTENT_IS_OPEN,
value: true,
});
newLayoutContextDispatch({
type: ACTIONS.SET_SIDEBAR_CONTENT_PANEL,
value: PANELS.POLL,
});
Session.set('forcePollOpen', true);
Session.set('pollInitiated', true);
};
const getAvailableQuickPolls = (slideId, parsedSlides, startPoll, pollTypes, newLayoutContextDispatch) => {
const pollItemElements = parsedSlides.map((poll) => {
const { poll: label } = poll;
let { type } = poll;
@ -111,7 +124,7 @@ class QuickPollDropdown extends Component {
);
const { slideId, quickPollOptions } = parsedSlide;
const quickPolls = getAvailableQuickPolls(slideId, quickPollOptions, startPoll, pollTypes);
const quickPolls = getAvailableQuickPolls(slideId, quickPollOptions, startPoll, pollTypes, newLayoutContextDispatch);
if (quickPollOptions.length === 0) return null;