diff --git a/src/components/LoginPage/LoginForm.tsx b/src/components/LoginPage/LoginForm.tsx index 8f28886..b00630f 100644 --- a/src/components/LoginPage/LoginForm.tsx +++ b/src/components/LoginPage/LoginForm.tsx @@ -1,6 +1,7 @@ "use client"; -import { FormHelperText, SxProps } from "@mui/material"; +import { Visibility, VisibilityOff } from "@mui/icons-material"; +import { FormHelperText, IconButton, InputAdornment, SxProps } from "@mui/material"; import Button from "@mui/material/Button"; import Stack from "@mui/material/Stack"; import TextField from "@mui/material/TextField"; @@ -41,6 +42,10 @@ const LoginForm: React.FC<{ sx?: SxProps }> = ({ sx }) => { const [serverError, setServerError] = useState(); + const [showPassword, setShowPassword] = useState(false); + const handleClickShowPassword = () => setShowPassword(!showPassword); + const handleMouseDownPassword = () => setShowPassword(!showPassword); + const router = useRouter(); const onSubmit: SubmitHandler = async (data) => { @@ -76,10 +81,23 @@ const LoginForm: React.FC<{ sx?: SxProps }> = ({ sx }) => { /> + + {showPassword ? : } + + + ), + }} /> {serverError && (