fix(WaitForOwnerDialog) simplify code

Don't print the room name, which could be long and nondescriptive.
This commit is contained in:
Saúl Ibarra Corretgé
2022-03-02 16:28:42 +01:00
committed by Дамян Минков
parent feb1b93ce6
commit 0c042ca720
59 changed files with 57 additions and 170 deletions

View File

@@ -4,9 +4,8 @@ import React, { PureComponent } from 'react';
import type { Dispatch } from 'redux';
import { Dialog } from '../../../base/dialog';
import { translate, translateToHTML } from '../../../base/i18n';
import { translate } from '../../../base/i18n';
import { connect } from '../../../base/redux';
import { safeDecodeURIComponent } from '../../../base/util';
import { cancelWaitForOwner } from '../../actions.web';
/**
@@ -14,11 +13,6 @@ import { cancelWaitForOwner } from '../../actions.web';
*/
type Props = {
/**
* The name of the conference room (without the domain part).
*/
_room: string,
/**
* Redux store dispatch method.
*/
@@ -89,7 +83,6 @@ class WaitForOwnerDialog extends PureComponent<Props> {
*/
render() {
const {
_room: room,
t
} = this.props;
@@ -103,30 +96,11 @@ class WaitForOwnerDialog extends PureComponent<Props> {
titleKey = { t('dialog.WaitingForHostTitle') }
width = { 'small' }>
<span>
{
translateToHTML(
t, 'dialog.WaitForHostMsg', { room })
}
{ t('dialog.WaitForHostMsg') }
</span>
</Dialog>
);
}
}
/**
* Maps (parts of) the Redux state to the associated props for the
* {@code WaitForOwnerDialog} component.
*
* @param {Object} state - The Redux state.
* @private
* @returns {Props}
*/
function mapStateToProps(state) {
const { authRequired } = state['features/base/conference'];
return {
_room: authRequired && safeDecodeURIComponent(authRequired.getName())
};
}
export default translate(connect(mapStateToProps)(WaitForOwnerDialog));
export default translate(connect()(WaitForOwnerDialog));