diff --git a/src/components/AuthPages/SignUp/index.jsx b/src/components/AuthPages/SignUp/index.jsx index ad0b425..c9e9d49 100644 --- a/src/components/AuthPages/SignUp/index.jsx +++ b/src/components/AuthPages/SignUp/index.jsx @@ -1,6 +1,5 @@ import React, { useCallback, useEffect, useState } from "react"; import { Link, useNavigate } from "react-router-dom"; -import facebookLogo from "../../../assets/images/facebook-4.svg"; import WrenchBoard from "../../../assets/images/wrenchboard.png"; import usersService from "../../../services/UsersService"; import InputCom from "../../Helpers/Inputs/InputCom"; @@ -69,13 +68,17 @@ export default function SignUp() { let regEx = /^[^0-9][a-zA-Z0-9._%+-]+@[a-zA-Z]+(\.[a-zA-Z]+)+$/; if (regEx.test(email) == false) { setMsgError("Invalid Email"); - return setTimeout(()=>{setMsgError("");},3000) + return setTimeout(() => { + setMsgError(""); + }, 3000); } //checks if terms and condition is checked if (!checked) { setMsgError("Terms and condition required"); - return setTimeout(()=>{setMsgError("");},3000) + return setTimeout(() => { + setMsgError(""); + }, 3000); } setSignUpLoading(true); @@ -95,7 +98,9 @@ export default function SignUp() { if (res.status === 200) { const { data } = res; if (data && data.acc === "DULPICATE") { - setMsgError("Unable to use this username. Please try another username."); + setMsgError( + "Unable to use this username. Please try another username." + ); setSignUpLoading(false); } if (data && data.status === "1") { @@ -211,9 +216,7 @@ export default function SignUp() { name="password" type={showPassword ? "text" : "password"} onClick={togglePasswordVisibility} - passIcon={ - showPassword ? "show-password" : "hide-password" - } + passIcon={showPassword ? "show-password" : "hide-password"} value={formData.password} inputHandler={handleInputChange} /> @@ -223,7 +226,48 @@ export default function SignUp() { {msgError} )} +