lazy element, settings: account delete and secret update

This commit is contained in:
realaravinth
2021-07-21 20:44:22 +05:30
parent 2c2f79e1cd
commit 861998af75
15 changed files with 308 additions and 36 deletions

View File

@@ -20,9 +20,15 @@ import ROUTES from '../../../api/v1/routes';
import genJsonPayload from '../../../utils/genJsonPayload';
import createError from '../../../components/error/index';
const emailExists = async () => {
const email = <HTMLInputElement>document.getElementById('email');
const emailExists = async (element?: HTMLInputElement) => {
let email;
if (element === undefined || element === null) {
email = <HTMLInputElement>document.getElementById('email');
} else {
email = element;
}
const val = email.value;
const payload = {
val,
};