mirror of
https://github.com/plankanban/planka.git
synced 2025-12-21 17:25:39 +03:00
ref: Remove board types, refactoring
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
import omit from 'lodash/omit';
|
||||
import isEmail from 'validator/lib/isEmail';
|
||||
import React, { useCallback, useEffect, useMemo, useRef } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
@@ -78,12 +77,16 @@ const UserEmailEditStep = React.memo(
|
||||
return;
|
||||
}
|
||||
|
||||
if (usePasswordConfirmation && !cleanData.currentPassword) {
|
||||
currentPasswordField.current.focus();
|
||||
return;
|
||||
if (usePasswordConfirmation) {
|
||||
if (!cleanData.currentPassword) {
|
||||
currentPasswordField.current.focus();
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
delete cleanData.currentPassword;
|
||||
}
|
||||
|
||||
onUpdate(usePasswordConfirmation ? cleanData : omit(cleanData, 'currentPassword'));
|
||||
onUpdate(cleanData);
|
||||
}, [email, usePasswordConfirmation, onUpdate, onClose, data]);
|
||||
|
||||
useEffect(() => {
|
||||
|
||||
Reference in New Issue
Block a user