// ** React Imports import { ChangeEvent, MouseEvent, useState } from 'react' // ** MUI Imports import Box from '@mui/material/Box' import Grid from '@mui/material/Grid' import Avatar from '@mui/material/Avatar' import Button from '@mui/material/Button' import Divider from '@mui/material/Divider' import InputLabel from '@mui/material/InputLabel' import IconButton from '@mui/material/IconButton' import Typography from '@mui/material/Typography' import CardContent from '@mui/material/CardContent' import FormControl from '@mui/material/FormControl' import OutlinedInput from '@mui/material/OutlinedInput' import InputAdornment from '@mui/material/InputAdornment' // ** Icons Imports import EyeOutline from 'mdi-material-ui/EyeOutline' import KeyOutline from 'mdi-material-ui/KeyOutline' import EyeOffOutline from 'mdi-material-ui/EyeOffOutline' import LockOpenOutline from 'mdi-material-ui/LockOpenOutline' interface State { newPassword: string currentPassword: string showNewPassword: boolean confirmNewPassword: string showCurrentPassword: boolean showConfirmNewPassword: boolean } const TabSecurity = () => { // ** States const [values, setValues] = useState({ newPassword: '', currentPassword: '', showNewPassword: false, confirmNewPassword: '', showCurrentPassword: false, showConfirmNewPassword: false }) // Handle Current Password const handleCurrentPasswordChange = (prop: keyof State) => (event: ChangeEvent) => { setValues({ ...values, [prop]: event.target.value }) } const handleClickShowCurrentPassword = () => { setValues({ ...values, showCurrentPassword: !values.showCurrentPassword }) } const handleMouseDownCurrentPassword = (event: MouseEvent) => { event.preventDefault() } // Handle New Password const handleNewPasswordChange = (prop: keyof State) => (event: ChangeEvent) => { setValues({ ...values, [prop]: event.target.value }) } const handleClickShowNewPassword = () => { setValues({ ...values, showNewPassword: !values.showNewPassword }) } const handleMouseDownNewPassword = (event: MouseEvent) => { event.preventDefault() } // Handle Confirm New Password const handleConfirmNewPasswordChange = (prop: keyof State) => (event: ChangeEvent) => { setValues({ ...values, [prop]: event.target.value }) } const handleClickShowConfirmNewPassword = () => { setValues({ ...values, showConfirmNewPassword: !values.showConfirmNewPassword }) } const handleMouseDownConfirmNewPassword = (event: MouseEvent) => { event.preventDefault() } return (
Current Password {values.showCurrentPassword ? : } } /> New Password {values.showNewPassword ? : } } /> Confirm New Password {values.showConfirmNewPassword ? : } } /> avatar Two-factor authentication Two factor authentication is not enabled yet. Two-factor authentication adds an additional layer of security to your account by requiring more than just a password to log in. Learn more. ) } export default TabSecurity