diff --git a/package-lock.json b/package-lock.json index bc57870..2721515 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2,5 +2,49 @@ "name": "bio-branch", "lockfileVersion": 3, "requires": true, - "packages": {} + "packages": { + "": { + "dependencies": { + "react-icons": "^5.3.0" + } + }, + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "peer": true + }, + "node_modules/loose-envify": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", + "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", + "peer": true, + "dependencies": { + "js-tokens": "^3.0.0 || ^4.0.0" + }, + "bin": { + "loose-envify": "cli.js" + } + }, + "node_modules/react": { + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react/-/react-18.3.1.tgz", + "integrity": "sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==", + "peer": true, + "dependencies": { + "loose-envify": "^1.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/react-icons": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/react-icons/-/react-icons-5.3.0.tgz", + "integrity": "sha512-DnUk8aFbTyQPSkCfF8dbX6kQjXA9DktMeJqfjrg6cK9vwQVMxmcA3BfP4QoiztVmEHtwlTgLFsPuH2NskKT6eg==", + "peerDependencies": { + "react": "*" + } + } + } } diff --git a/package.json b/package.json new file mode 100644 index 0000000..644e5da --- /dev/null +++ b/package.json @@ -0,0 +1,5 @@ +{ + "dependencies": { + "react-icons": "^5.3.0" + } +} diff --git a/site/pages/apply.js b/site/pages/apply.js index 262899b..79b2778 100644 --- a/site/pages/apply.js +++ b/site/pages/apply.js @@ -3,6 +3,8 @@ import styles from '../styles/apply.module.css'; import { toast } from 'react-toastify'; import Link from 'next/link'; import { useRouter } from 'next/router'; +import { FaEye } from "react-icons/fa"; +import { FaEyeSlash } from "react-icons/fa"; const Apply = () => { const router = useRouter(); @@ -10,6 +12,7 @@ const Apply = () => { const [category, setCategory] = useState(''); const [email, setEmail] = useState(''); const [password, setPassword] = useState(''); + const [showPassword, setShowPassword] = useState(false); const [submitted, setSubmitted] = useState(false); const handleCategoryChange = (e) => { @@ -70,7 +73,7 @@ const Apply = () => { { setPassword(e.target.value)} required /> +
Account Type
diff --git a/site/pages/login.js b/site/pages/login.js index 4b03f33..6d77094 100644 --- a/site/pages/login.js +++ b/site/pages/login.js @@ -3,11 +3,14 @@ import styles from '../styles/apply.module.css'; import { toast } from 'react-toastify'; import Link from 'next/link'; import { useRouter } from 'next/router'; +import { FaEye } from "react-icons/fa"; +import { FaEyeSlash } from "react-icons/fa"; const Login = () => { const route = useRouter(); const [email, setEmail] = useState(''); const [password, setPassword] = useState(''); + const [showPassword, setShowPassword] = useState(false); // State to toggle password visibility const handleLogin = (e) => { e.preventDefault(); @@ -20,7 +23,6 @@ const Login = () => { body: JSON.stringify({ email, password }), }; - // backend implementations fetch('https://bio-branch-server.onrender.com/api/login', options) .then(response => response.json()) .then(data => { @@ -36,7 +38,6 @@ const Login = () => { .catch(error => toast.error("An error occurred. Please try again.")); }; - // Google login function const googleLogin = () => { window.location.href = 'http://localhost:4000/auth/google'; }; @@ -51,11 +52,32 @@ const Login = () => {
- setEmail(e.target.value)} /> + setEmail(e.target.value)} + /> + - setPassword(e.target.value)} required/> + setPassword(e.target.value)} + required + /> +