diff --git a/src/components/AuthPages/Login/index.jsx b/src/components/AuthPages/Login/index.jsx index f2f8b51..85826fd 100644 --- a/src/components/AuthPages/Login/index.jsx +++ b/src/components/AuthPages/Login/index.jsx @@ -16,6 +16,8 @@ import { updateUserDetails } from "../../../store/UserDetails"; export default function Login() { const dispatch = useDispatch(); + let [loginCom, setLoginCom] = useState({user: true, family: false}) + const [checked, setValue] = useState(false); const [loginLoading, setLoginLoading] = useState(false); @@ -28,6 +30,15 @@ export default function Login() { setValue(!checked); }; + //FUNCTION TO DETERMINE/CHANGE LOGIN COMPONENT + const handleLoginCom = ({target:{name}}) => { + if(name == 'user'){ + setLoginCom({[name]: true, family: false}) + }else{ + setLoginCom({[name]: false, family: true}) + } + } + // email const [email, setMail] = useState(""); const handleEmail = (e) => { @@ -102,9 +113,9 @@ export default function Login() {
-

+ {/*

Sign In to WrenchBoard -

+ */} New Here?{" "}
-
-
- -
-
- + {/* switch login component */} +
+ + +
+ + {/* END of switch login component */} + + {/* for login component */} + {loginCom.user ? + //user login compoenent +
+
+ +
+ +
+ +
+ {loginError && ( +
+ Invalid username or password- Please{" "} + + reset your password + {" "} + or{" "} + + create a new account + +
+ )} + {msgError && ( +
+ {msgError} +
+ )} +
+
+ +
+ + + +
- {loginError && ( -
- Invalid username or password- Please{" "} - - reset your password - {" "} - or{" "} - - create a new account - + // END of user login compoenent + : + // family login compoenent +
+
+
- )} - {msgError && ( -
- {msgError} + +
+
- )} -
-
- + {loginError && ( +
+ Invalid username or password{" "} + {/* + reset your password + {" "} + or{" "} + + create a new account + */} +
+ )} + {msgError && ( +
+ {msgError} +
+ )} +
+
+ +
- - -
- {/*
-

- Don't have an account ? - - Sign up free - -

-
*/} -
+ // END of family login compoenent + } + {/* END of login component */} + +
This site is protected by hCaptcha and the our Privacy Policy and Terms of Service apply. -