fix(prejoin) hide skip prejoin for exposed app

This commit is contained in:
Tudor-Ovidiu Avram 2020-07-23 13:27:56 +03:00 committed by Saúl Ibarra Corretgé
parent 1ae5630590
commit f6433668d5
2 changed files with 20 additions and 4 deletions

View File

@ -105,6 +105,11 @@ type Props = {
*/ */
showDialog: boolean, showDialog: boolean,
/**
* Flag signaling the visibility of the skip prejoin toggle
*/
showSkipPrejoin: boolean,
/** /**
* Used for translation. * Used for translation.
*/ */
@ -134,7 +139,8 @@ class Prejoin extends Component<Props, State> {
* @static * @static
*/ */
static defaultProps = { static defaultProps = {
showJoinActions: true showJoinActions: true,
showSkipPrejoin: true
}; };
/** /**
@ -339,7 +345,11 @@ class Prejoin extends Component<Props, State> {
* @returns {React$Element} * @returns {React$Element}
*/ */
_renderSkipPrejoinButton() { _renderSkipPrejoinButton() {
const { buttonIsToggled, t } = this.props; const { buttonIsToggled, t, showSkipPrejoin } = this.props;
if (!showSkipPrejoin) {
return null;
}
return ( return (
<div className = 'prejoin-checkbox-container'> <div className = 'prejoin-checkbox-container'>

View File

@ -21,6 +21,11 @@ type Props = {
* Flag signaling the visibility of join label, input and buttons * Flag signaling the visibility of join label, input and buttons
*/ */
showJoinActions: boolean, showJoinActions: boolean,
/**
* Flag signaling the visibility of the skip prejoin toggle
*/
showSkipPrejoin: boolean,
}; };
/** /**
@ -42,13 +47,14 @@ export default class PrejoinApp extends BaseApp<Props> {
this._init.then(async () => { this._init.then(async () => {
const { store } = this.state; const { store } = this.state;
const { dispatch } = store; const { dispatch } = store;
const { showAvatar, showJoinActions } = this.props; const { showAvatar, showJoinActions, showSkipPrejoin } = this.props;
super._navigate({ super._navigate({
component: Prejoin, component: Prejoin,
props: { props: {
showAvatar, showAvatar,
showJoinActions showJoinActions,
showSkipPrejoin
} }
}); });