diff --git a/client/images/eye-close.png b/client/images/eye-close.png new file mode 100644 index 0000000000..62dc80a99b Binary files /dev/null and b/client/images/eye-close.png differ diff --git a/client/images/eye-open.png b/client/images/eye-open.png new file mode 100644 index 0000000000..c5b58c00a0 Binary files /dev/null and b/client/images/eye-open.png differ diff --git a/client/modules/User/components/LoginForm.jsx b/client/modules/User/components/LoginForm.jsx index d990299322..eda6fb4217 100644 --- a/client/modules/User/components/LoginForm.jsx +++ b/client/modules/User/components/LoginForm.jsx @@ -1,10 +1,12 @@ -import React from 'react'; +import React, { useState } from 'react'; import { useTranslation } from 'react-i18next'; import { Form, Field } from 'react-final-form'; import { useDispatch } from 'react-redux'; import Button from '../../../common/Button'; import { validateLogin } from '../../../utils/reduxFormUtils'; import { validateAndLoginUser } from '../actions'; +import eyeClose from '../../../images/eye-close.png'; +import eyeOpen from '../../../images/eye-open.png'; function LoginForm() { const { t } = useTranslation(); @@ -14,6 +16,12 @@ function LoginForm() { return dispatch(validateAndLoginUser(formProps)); } + const [showPassword, setShowPassword] = useState(false); + + const handleShow = () => { + setShowPassword((prev) => !prev); + }; + return (