Add the meteor disconnect on meeting ended and error screen

This commit is contained in:
Tainan Felipe 2018-11-05 13:48:57 -02:00
parent ccf79b8bca
commit 50d8995600
2 changed files with 16 additions and 0 deletions

View File

@ -1,6 +1,7 @@
import React from 'react';
import PropTypes from 'prop-types';
import { defineMessages, injectIntl } from 'react-intl';
import { Meteor } from 'meteor/meteor';
import Button from '/imports/ui/components/button/component';
import { styles } from './styles';
@ -34,6 +35,10 @@ const defaultProps = {
};
class ErrorScreen extends React.PureComponent {
componentDidMount() {
Meteor.disconnect();
}
render() {
const {
intl,

View File

@ -1,6 +1,7 @@
import React from 'react';
import PropTypes from 'prop-types';
import { defineMessages, injectIntl } from 'react-intl';
import { Meteor } from 'meteor/meteor';
import Auth from '/imports/ui/services/auth';
import Button from '/imports/ui/components/button/component';
import getFromUserSettings from '/imports/ui/services/users-settings';
@ -8,6 +9,7 @@ import { logoutRouteHandler } from '/imports/startup/client/auth';
import Rating from './rating/component';
import { styles } from './styles';
const intlMessage = defineMessages({
410: {
id: 'app.meeting.ended',
@ -21,6 +23,10 @@ const intlMessage = defineMessages({
id: 'app.error.meeting.ended',
description: 'user logged conference',
},
'acl-not-allowed': {
id: 'app.error.removed',
description: 'Message to display when user is removed from the conference',
},
messageEnded: {
id: 'app.meeting.endedMessage',
description: 'message saying to go back to home screen',
@ -82,6 +88,11 @@ class MeetingEnded extends React.PureComponent {
this.sendFeedback = this.sendFeedback.bind(this);
this.shouldShowFeedback = getFromUserSettings('askForFeedbackOnLogout', Meteor.settings.public.app.askForFeedbackOnLogout);
}
componentDidMount() {
Meteor.disconnect();
}
setSelectedStar(starNumber) {
this.setState({
selected: starNumber,