diff --git a/client/components/ContentLists/Manual/ArticleItem.jsx b/client/components/ContentLists/Manual/ArticleItem.jsx index ed09e43..38ce8f1 100644 --- a/client/components/ContentLists/Manual/ArticleItem.jsx +++ b/client/components/ContentLists/Manual/ArticleItem.jsx @@ -21,6 +21,17 @@ const ArticleItem = ({ thumbnail = helpers.getRenditionUrl(item.feature_media.renditions); } + if (item.associations && item.associations.featuremedia) { + const renditions = item.associations.featuremedia.renditions; + + const renditionsArray = Object.keys(renditions).map(key => ({ + ...renditions[key], + name: key + })); + + thumbnail = helpers.getRenditionUrl(renditionsArray); + } + return (
{ const articleItemsMapped = response._items.map(( - { _id, authors, body_html, headline, versioncreated, featured_image }) => ({ + { _id, authors, body_html, headline, versioncreated, state, associations }) => ({ id: _id, authors, body: body_html, title: headline, published_at: versioncreated, - feature_media: featured_image, - route: { name: 'Superdesk' } + route: { name: state.replace('_', ' ') }, + associations }) );