From 06400c703477a3e0de44f5d7b0a66a3c9737a4d9 Mon Sep 17 00:00:00 2001 From: gcampes Date: Thu, 21 Sep 2017 15:50:21 -0300 Subject: [PATCH 1/3] fix breakout logout --- .../logout-confirmation/component.jsx | 76 ++++++++++--------- .../logout-confirmation/container.jsx | 20 ++--- .../components/logout-confirmation/service.js | 9 ++- 3 files changed, 56 insertions(+), 49 deletions(-) diff --git a/bigbluebutton-html5/imports/ui/components/logout-confirmation/component.jsx b/bigbluebutton-html5/imports/ui/components/logout-confirmation/component.jsx index 7ed2ae2461..4c035d5cc9 100644 --- a/bigbluebutton-html5/imports/ui/components/logout-confirmation/component.jsx +++ b/bigbluebutton-html5/imports/ui/components/logout-confirmation/component.jsx @@ -1,9 +1,17 @@ -import React, { Component } from 'react'; +import React from 'react'; +import PropTypes from 'prop-types'; import { withRouter } from 'react-router'; import { defineMessages, injectIntl } from 'react-intl'; import Button from '/imports/ui/components/button/component'; import Modal from '/imports/ui/components/modal/fullscreen/component'; -import styles from './styles.scss'; +import styles from './styles'; + +const propTypes = { + handleEndMeeting: PropTypes.func.isRequired, + intl: PropTypes.object.isRequired, + router: PropTypes.object.isRequired, + showEndMeeting: PropTypes.bool.isRequired, +}; const intlMessages = defineMessages({ title: { @@ -40,38 +48,38 @@ const intlMessages = defineMessages({ }, }); -class LeaveConfirmation extends Component { +const LeaveConfirmation = ({ + intl, + router, + handleEndMeeting, + showEndMeeting, +}) => ( + router.push('/logout'), + label: intl.formatMessage(intlMessages.confirmLabel), + description: intl.formatMessage(intlMessages.confirmDesc), + }} + dismiss={{ + callback: () => null, + label: intl.formatMessage(intlMessages.dismissLabel), + description: intl.formatMessage(intlMessages.dismissDesc), + }} + > + {intl.formatMessage(intlMessages.message)} + {showEndMeeting ? +