Skip to content

Commit

Permalink
Fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
thecalcc committed Nov 1, 2024
1 parent 55c9551 commit 5c7ef75
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
2 changes: 1 addition & 1 deletion client/components/Coverages/CoverageArrayInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ const mapStateToProps = (state) => ({

const mapDispatchToProps = (dispatch) => ({
onRemoveAssignment: (assignment) => dispatch(actions.assignments.ui.showRemoveAssignmentModal(assignment)),
})
});

class CoverageArrayInputComponent extends React.Component<IProps, IState> {
constructor(props) {
Expand Down
17 changes: 11 additions & 6 deletions client/components/UI/Form/InputArray/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,13 @@ import {Row, LineInput} from '../';
import './style.scss';
import {superdeskApi} from '../../../../superdeskApi';
import {planningApis} from '../../../../api';
import {EDITOR_TYPE, IAssignmentItem, IG2ContentType, IPlanningCoverageItem, IPlanningNewsCoverageStatus} from 'interfaces';
import {
EDITOR_TYPE,
IAssignmentItem,
IG2ContentType,
IPlanningCoverageItem,
IPlanningNewsCoverageStatus,
} from 'interfaces';
import {IDesk} from 'superdesk-api';

interface IProps {
Expand Down Expand Up @@ -167,11 +173,10 @@ export class InputArray extends React.PureComponent<IProps> {
{(value || []).map((val, index) => (
<Component
{...props}
onRemoveAssignment={(val) => {
return planningApis.assignments.getById(val.assigned_to.assignment_id).then((assignment) =>
this.props.onRemoveAssignment(assignment)
);
}}
onRemoveAssignment={(val) =>
planningApis.assignments.getById(val.assigned_to.assignment_id)
.then((assignment) => this.props.onRemoveAssignment(assignment))
}
key={index}
ref={this.props.getRef == null ? null : this.props.getRef(field, val)}
testId={`${testId}[${index}]`}
Expand Down

0 comments on commit 5c7ef75

Please sign in to comment.