@@ -7,28 +7,36 @@ import React from 'react'
77import { ShellScreen , Type , Shell } from '@blockstack/ui'
88import PropTypes from 'prop-types'
99class RecoverInformationScreen extends React . Component {
10- sendEmailAgain = ( ) => {
11- if ( ! this . props . emailsSending ) {
12- this . props . sendRestoreEmail ( )
13- }
14- }
15-
1610 render ( ) {
17- const { next, email, emailsSending, ...rest } = this . props
11+ const {
12+ next,
13+ email,
14+ emailsSending,
15+ recoveryEmailErrorCount,
16+ ...rest
17+ } = this . props
1818
1919 const title = 'Recovery email failed to send'
20- const body = (
21- < >
22- < Type . p >
23- We tried to send recovery info to { email } but something went wrong.
24- You can{ ' ' }
25- < Type . a onClick = { ( ) => this . sendEmailAgain ( ) } >
26- try to resend the email
27- </ Type . a >
28- , or manually save your Secret Recovery Key.
29- </ Type . p >
30- </ >
31- )
20+ const body =
21+ recoveryEmailErrorCount > 1 ? (
22+ < >
23+ < Type . p >
24+ We tried to send recovery info to { email } but something went wrong.
25+ You must manually save your Secret Recovery Key.
26+ </ Type . p >
27+ </ >
28+ ) : (
29+ < >
30+ < Type . p >
31+ We tried to send recovery info to { email } but something went wrong.
32+ You can{ ' ' }
33+ < Type . a onClick = { ( ) => this . props . backView ( ) } >
34+ try to resend the email
35+ </ Type . a >
36+ , or manually save your Secret Recovery Key.
37+ </ Type . p >
38+ </ >
39+ )
3240
3341 const props = {
3442 title : {
@@ -41,7 +49,7 @@ class RecoverInformationScreen extends React.Component {
4149 actions : {
4250 items : [
4351 {
44- label : 'Secret Recover Key' ,
52+ label : 'Secret Recovery Key' ,
4553 onClick : ( ) => next ( ) ,
4654 primary : true
4755 }
@@ -63,7 +71,7 @@ RecoverInformationScreen.propTypes = {
6371 next : PropTypes . func . isRequired ,
6472 toggleConsent : PropTypes . func . isRequired ,
6573 email : PropTypes . string . isRequired ,
66- consent : PropTypes . bool . isRequired ,
74+ recoveryEmailErrorCount : PropTypes . number . isRequired ,
6775 restoreEmailError : PropTypes . oneOfType ( [
6876 PropTypes . string ,
6977 PropTypes . instanceOf ( Error )
0 commit comments