Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const DeleteAccountModal = ({ onClose, ...rest }) => {
const { createNotification } = useNotifications();
const eventManager = useEventManager();
const api = useApi();
const authentication = useAuthentication();
const [{ isAdmin, Name } = {}] = useUser();
const [{ TwoFactor } = {}] = useUserSettings();
const [loading, setLoading] = useState(false);
const [model, setModel] = useState({
feedback: '',
email: '',
password: '',
twoFa: ''
});
const { CLIENT_ID, APP_VERSION, CLIENT_TYPE } = useConfig();
const Client = getClient(CLIENT_ID);
const handleChange = (key) => ({ target }) => setModel({ ...model, [key]: target.value });