Skip to content

Commit

Permalink
[ESD-22705] Don't pass function to ConfirmationPane unless closable i…
Browse files Browse the repository at this point in the history
…s enabled (#2176)

Co-authored-by: Steve Hobbs <[email protected]>
  • Loading branch information
ewanharris and Steve Hobbs authored Sep 22, 2022
1 parent 333fbb4 commit d69e607
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 29 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,33 +4,6 @@ exports[`EmailSentConfirmation renders correctly 1`] = `
<div
className="auth0-lock-confirmation"
>
<span
aria-label="close"
className="auth0-lock-close-button"
id="__lock-id__-close-button"
onClick={[Function]}
onKeyPress={[Function]}
role="button"
tabIndex={0}
>
<svg
aria-hidden="true"
enableBackground="new 0 0 128 128"
focusable="false"
version="1.1"
viewBox="0 0 128 128"
xmlSpace="preserve"
xmlns="http://www.w3.org/2000/svg"
xmlnsXlink="http://www.w3.org/1999/xlink"
>
<g>
<polygon
fill="#373737"
points="123.5429688,11.59375 116.4765625,4.5185547 64.0019531,56.9306641 11.5595703,4.4882813 4.4882813,11.5595703 56.9272461,63.9970703 4.4570313,116.4052734 11.5244141,123.4814453 63.9985352,71.0683594 116.4423828,123.5117188 123.5126953,116.4414063 71.0732422,64.0019531 "
/>
</g>
</svg>
</span>
<span
aria-label="back"
className="auth0-lock-back-button"
Expand Down
4 changes: 2 additions & 2 deletions src/connection/passwordless/email_sent_confirmation.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ class Resend extends React.Component {
export default class EmailSentConfirmation extends React.Component {
render() {
const { lock } = this.props;
const closeHandler = l.ui.closable(lock) ? this.handleClose : undefined;
const closeHandler = l.ui.closable(lock) ? ::this.handleClose : undefined;
const labels = {
failed: i18n.str(lock, 'failedLabel'),
resend: i18n.str(lock, 'resendLabel'),
Expand All @@ -93,7 +93,7 @@ export default class EmailSentConfirmation extends React.Component {
<SuccessPane
lock={lock}
backHandler={() => this.handleBack()}
closeHandler={() => closeHandler()}
closeHandler={closeHandler}
>
<p>{i18n.html(lock, ['success', 'magicLink'], c.email(lock))}</p>
<Resend labels={labels} lock={lock} />
Expand Down

0 comments on commit d69e607

Please sign in to comment.