frontend linting

This commit is contained in:
realaravinth
2021-10-08 15:24:29 +05:30
parent f7afc72d81
commit 53720ff740
91 changed files with 2158 additions and 1677 deletions

View File

@@ -15,15 +15,15 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import ROUTES from '../../../api/v1/routes';
import ROUTES from "../../../api/v1/routes";
import genJsonPayload from '../../../utils/genJsonPayload';
import createError from '../../../components/error/index';
import genJsonPayload from "../../../utils/genJsonPayload";
import createError from "../../../components/error/index";
const emailExists = async (element?: HTMLInputElement) => {
const emailExists = async (element?: HTMLInputElement): Promise<boolean> => {
let email;
if (element === undefined || element === null) {
email = <HTMLInputElement>document.getElementById('email');
email = <HTMLInputElement>document.getElementById("email");
} else {
email = element;
}
@@ -37,7 +37,7 @@ const emailExists = async (element?: HTMLInputElement) => {
if (res.ok) {
const data = await res.json();
if (data.exists) {
email.className += ' form__in-field--warn';
email.className += " form__in-field--warn";
createError(`Email "${val}" is already used`);
return data.exists;
}