destructure function

This commit is contained in:
Bohdan Zhemelinskyi 2023-03-15 18:16:56 +00:00
parent 1025e4b1dc
commit 2015c50105

View File

@ -161,19 +161,21 @@ class PresentationToolbar extends PureComponent {
nextSlideHandler(event) {
const {
nextSlide, currentSlideNum, numberOfSlides, podId,
nextSlide, currentSlideNum, numberOfSlides, podId, endCurrentPoll,
} = this.props;
if (event) event.currentTarget.blur();
this.props.endCurrentPoll();
endCurrentPoll();
nextSlide(currentSlideNum, numberOfSlides, podId);
}
previousSlideHandler(event) {
const { previousSlide, currentSlideNum, podId } = this.props;
const {
previousSlide, currentSlideNum, podId, endCurrentPoll,
} = this.props;
if (event) event.currentTarget.blur();
this.props.endCurrentPoll();
endCurrentPoll();
previousSlide(currentSlideNum, podId);
}