ref: Remove board types, refactoring

This commit is contained in:
Maksim Eltyshev
2022-12-26 21:10:50 +01:00
parent 2b131f76c1
commit 6ffa817b53
182 changed files with 1573 additions and 1239 deletions
@@ -28,8 +28,8 @@ const ActionsStep = React.memo(
deleteConfirmationTitle,
deleteConfirmationContent,
deleteConfirmationButtonContent,
canLeave,
canEdit,
canLeave,
onUpdate,
onDelete,
onClose,
@@ -50,10 +50,8 @@ const ActionsStep = React.memo(
if (onUpdate) {
onUpdate(data);
}
onClose();
},
[onUpdate, onClose],
[onUpdate],
);
if (step) {
@@ -68,6 +66,7 @@ const ActionsStep = React.memo(
buttonContent="action.save"
onSelect={handleRoleSelect}
onBack={handleBack}
onClose={onClose}
/>
);
}
@@ -146,8 +145,8 @@ ActionsStep.propTypes = {
deleteConfirmationTitle: PropTypes.string,
deleteConfirmationContent: PropTypes.string,
deleteConfirmationButtonContent: PropTypes.string,
canLeave: PropTypes.bool.isRequired,
canEdit: PropTypes.bool.isRequired,
canLeave: PropTypes.bool.isRequired,
onUpdate: PropTypes.func,
onDelete: PropTypes.func.isRequired,
onClose: PropTypes.func.isRequired,
@@ -56,10 +56,8 @@ const AddStep = React.memo(
userId: step.params.userId,
...data,
});
onClose();
},
[onCreate, onClose, step],
[onCreate, step],
);
useEffect(() => {
@@ -79,6 +77,7 @@ const AddStep = React.memo(
buttonContent="action.addMember"
onSelect={handleRoleSelect}
onBack={handleBack}
onClose={onClose}
/>
);
}
@@ -44,8 +44,8 @@ const Memberships = React.memo(
deleteConfirmationTitle={deleteConfirmationTitle}
deleteConfirmationContent={deleteConfirmationContent}
deleteConfirmationButtonContent={deleteConfirmationButtonContent}
canLeave={items.length > 1 || canLeaveIfLast}
canEdit={canEdit}
canLeave={items.length > 1 || canLeaveIfLast}
onUpdate={(data) => onUpdate(item.id, data)}
onDelete={() => onDelete(item.id)}
>