import React from 'react'; import {IArticle} from 'superdesk-api'; import {dataApi} from 'core/helpers/CrudManager'; interface IProps { ids: Array; onClick: (item: IArticle) => void; } interface IState { items: Array; } export class TranslationsList extends React.PureComponent { constructor(props) { super(props); this.state = {items: []}; } componentDidMount() { Promise.all(this.props.ids.map((id) => dataApi.findOne('archive', id), )).then((items) => { this.setState({items}); }); } render() { return ( ); } }