fix: lobby screen broken with prejoin disabled

This commit is contained in:
Bettenbuk Zoltan 2020-06-17 11:37:27 +02:00 committed by Дамян Минков
parent 482ba23954
commit bcffe0bba5
3 changed files with 17 additions and 6 deletions

View File

@ -92,6 +92,8 @@ export default class InputField extends PureComponent<Props, State> {
value
};
}
return null;
}
/**

View File

@ -128,6 +128,8 @@ export default class AbstractLobbyScreen<P: Props = Props> extends PureComponent
passwordJoinFailed: true
};
}
return null;
}
/**

View File

@ -70,13 +70,25 @@ class LobbyScreen extends AbstractLobbyScreen {
);
}
/**
* Renders the participant form to let the knocking participant enter its details.
*
* NOTE: We don't use edit action on web since the prejoin functionality got merged.
* Mobile won't use it either once prejoin gets implemented there too.
*
* @inheritdoc
*/
_renderParticipantForm() {
return this._renderParticipantInfo();
}
/**
* Renders the participant info fragment when we have all the required details of the user.
*
* @inheritdoc
*/
_renderParticipantInfo() {
const { displayName, email } = this.state;
const { displayName } = this.state;
const { t } = this.props;
return (
@ -86,11 +98,6 @@ class LobbyScreen extends AbstractLobbyScreen {
onChange = { this._onChangeDisplayName }
placeHolder = { t('lobby.nameField') }
value = { displayName } />
<InputField
onChange = { this._onChangeEmail }
placeHolder = { t('lobby.emailField') }
value = { email } />
</div>
</div>
);