@@ -34,18 +34,14 @@ class B4aAdminPage extends DashboardView {
34
34
host : '' ,
35
35
adminURL : '' ,
36
36
isRoleCreated : false ,
37
- adminParams : { } ,
38
- userVerified : true ,
39
- lastSuccess : '' ,
40
- lastError : ''
37
+ adminParams : { }
41
38
}
42
39
43
40
this . legend = 'Admin App Setup'
44
41
this . description = 'Admin App is a web browser-based tool designed to manage the app data using a non-tech user interface.'
45
42
}
46
43
47
44
async componentDidMount ( ) {
48
- await this . checkPermission ( )
49
45
const adminParams = B4aAdminParams ( { appName : this . context . currentApp . name } )
50
46
await this . setState ( { adminParams } )
51
47
@@ -75,26 +71,6 @@ class B4aAdminPage extends DashboardView {
75
71
) ;
76
72
}
77
73
78
- async resendEmail ( ) {
79
- try {
80
- await axios . get ( `${ EMAIL_VERIFICATION_URL } /resend` , { withCredentials : true } )
81
- this . setState ( { lastSuccess : "The email has been sent!" , lastError : '' } )
82
- } catch ( error ) {
83
- this . setState ( { lastError : "Something went wrong! Please reach us on the chat" , lastSuccess : '' } )
84
- }
85
- setTimeout ( ( ) => { this . setState ( { lastSuccess : '' , lastError : '' } ) } ,
86
- 5000 ) ;
87
- }
88
-
89
- async checkPermission ( ) {
90
- let response = await axios . get ( `${ EMAIL_VERIFICATION_URL } /activated` , { withCredentials : true } )
91
- if ( response . data && response . data . isUserVerified ) {
92
- this . setState ( { userVerified : response . data . isUserVerified } )
93
- } else {
94
- this . setState ( { userVerified : false } )
95
- }
96
- }
97
-
98
74
async checkRole ( ) {
99
75
const { adminParams } = this . state
100
76
@@ -144,16 +120,7 @@ class B4aAdminPage extends DashboardView {
144
120
< Button value = 'Enable Admin App'
145
121
onClick = { this . renderModal . bind ( this ) }
146
122
primary = { true }
147
- className = { styles [ 'input-child' ] }
148
- disabled = { ! this . state . userVerified } />
149
- { ! this . state . userVerified ?
150
- < div className = { styles [ "box-email" ] } >
151
- < span > In order to enable this feature, you must confirm your account by email!</ span >
152
- < a href = 'javascript:;' onClick = { ( ) => this . resendEmail ( ) } > Resend email</ a >
153
- </ div >
154
- :< div > < span className = { styles [ 'message-error' ] } > Unauthorized!</ span > </ div > }
155
- { this . state . lastSuccess != '' ? this . displayMessage ( "green" , this . state . lastSuccess ) : null }
156
- { this . state . lastError != '' ? this . displayMessage ( "red" , this . state . lastError ) : null }
123
+ className = { styles [ 'input-child' ] } />
157
124
</ div >
158
125
</ div >
159
126
)
0 commit comments