Skip to content

Commit 053003e

Browse files
nataliacondenataliaconde
andauthored
Remove email verification (#218)
Co-authored-by: nataliaconde <[email protected]>
1 parent e47854d commit 053003e

File tree

1 file changed

+2
-35
lines changed

1 file changed

+2
-35
lines changed

src/dashboard/B4aAdminPage/B4aAdminPage.react.js

Lines changed: 2 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -34,18 +34,14 @@ class B4aAdminPage extends DashboardView {
3434
host: '',
3535
adminURL: '',
3636
isRoleCreated: false,
37-
adminParams: {},
38-
userVerified: true,
39-
lastSuccess: '',
40-
lastError: ''
37+
adminParams: {}
4138
}
4239

4340
this.legend = 'Admin App Setup'
4441
this.description = 'Admin App is a web browser-based tool designed to manage the app data using a non-tech user interface.'
4542
}
4643

4744
async componentDidMount() {
48-
await this.checkPermission()
4945
const adminParams = B4aAdminParams({ appName: this.context.currentApp.name })
5046
await this.setState({ adminParams })
5147

@@ -75,26 +71,6 @@ class B4aAdminPage extends DashboardView {
7571
);
7672
}
7773

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-
9874
async checkRole() {
9975
const { adminParams } = this.state
10076

@@ -144,16 +120,7 @@ class B4aAdminPage extends DashboardView {
144120
<Button value='Enable Admin App'
145121
onClick={this.renderModal.bind(this)}
146122
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']}/>
157124
</div>
158125
</div>
159126
)

0 commit comments

Comments
 (0)