Fix shadow variable errors
parent
5ddae04fb0
commit
0f0b4035b7
|
@ -110,17 +110,17 @@ export default class VerificationPanel extends React.PureComponent<IProps, IStat
|
||||||
|
|
||||||
if (this.props.layout === 'dialog') {
|
if (this.props.layout === 'dialog') {
|
||||||
// HACK: This is a terrible idea.
|
// HACK: This is a terrible idea.
|
||||||
let qrBlock: JSX.Element;
|
let qrBlockDialog: JSX.Element;
|
||||||
let sasBlock: JSX.Element;
|
let sasBlockDialog: JSX.Element;
|
||||||
if (showQR) {
|
if (showQR) {
|
||||||
qrBlock =
|
qrBlockDialog =
|
||||||
<div className='mx_VerificationPanel_QRPhase_startOption'>
|
<div className='mx_VerificationPanel_QRPhase_startOption'>
|
||||||
<p>{_t("Scan this unique code")}</p>
|
<p>{_t("Scan this unique code")}</p>
|
||||||
<VerificationQRCode qrCodeData={request.qrCodeData} />
|
<VerificationQRCode qrCodeData={request.qrCodeData} />
|
||||||
</div>;
|
</div>;
|
||||||
}
|
}
|
||||||
if (showSAS) {
|
if (showSAS) {
|
||||||
sasBlock =
|
sasBlockDialog =
|
||||||
<div className='mx_VerificationPanel_QRPhase_startOption'>
|
<div className='mx_VerificationPanel_QRPhase_startOption'>
|
||||||
<p>{_t("Compare unique emoji")}</p>
|
<p>{_t("Compare unique emoji")}</p>
|
||||||
<span className='mx_VerificationPanel_QRPhase_helpText'>{_t("Compare a unique set of emoji if you don't have a camera on either device")}</span>
|
<span className='mx_VerificationPanel_QRPhase_helpText'>{_t("Compare a unique set of emoji if you don't have a camera on either device")}</span>
|
||||||
|
@ -129,15 +129,15 @@ export default class VerificationPanel extends React.PureComponent<IProps, IStat
|
||||||
</AccessibleButton>
|
</AccessibleButton>
|
||||||
</div>;
|
</div>;
|
||||||
}
|
}
|
||||||
const or = qrBlock && sasBlock ?
|
const or = qrBlockDialog && sasBlockDialog ?
|
||||||
<div className='mx_VerificationPanel_QRPhase_betweenText'>{_t("or")}</div> : null;
|
<div className='mx_VerificationPanel_QRPhase_betweenText'>{_t("or")}</div> : null;
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
{_t("Verify this session by completing one of the following:")}
|
{_t("Verify this session by completing one of the following:")}
|
||||||
<div className='mx_VerificationPanel_QRPhase_startOptions'>
|
<div className='mx_VerificationPanel_QRPhase_startOptions'>
|
||||||
{qrBlock}
|
{qrBlockDialog}
|
||||||
{or}
|
{or}
|
||||||
{sasBlock}
|
{sasBlockDialog}
|
||||||
{noCommonMethodError}
|
{noCommonMethodError}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -425,7 +425,6 @@ export default class VerificationPanel extends React.PureComponent<IProps, IStat
|
||||||
const {request} = this.props;
|
const {request} = this.props;
|
||||||
request.on("change", this.onRequestChange);
|
request.on("change", this.onRequestChange);
|
||||||
if (request.verifier) {
|
if (request.verifier) {
|
||||||
const {request} = this.props;
|
|
||||||
const {sasEvent, reciprocateQREvent} = request.verifier;
|
const {sasEvent, reciprocateQREvent} = request.verifier;
|
||||||
this.setState({sasEvent, reciprocateQREvent});
|
this.setState({sasEvent, reciprocateQREvent});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue