import { PropTypes } from 'react';

function authors(actionPlan){
  let { actionPlansProposals } = actionPlan;

  if (actionPlansProposals) {
    return actionPlansProposals.map(
      (actionPlanProposal) =>
        actionPlanProposal.proposal.author.name
    );
  } else {
    return [];
  }
}

const ActionPlanAuthors = ({ actionPlan }) => (
  <div>
    <h3>{ I18n.t("components.action_plan_authors.title")}</h3>
    { authors(actionPlan).join(", ") }
  </div>
)

ActionPlanAuthors.propTypes = {
  actionPlan: PropTypes.object.isRequired
};

export default ActionPlanAuthors;

@@ -139,22 +139,29 @@
 ) %7B%0A    
-return
+let authors =
  actionP
@@ -256,21 +256,70 @@
 hor.name
-%0A    
+.trim()%0A    );%0A%0A    return Array.from(new Set(authors)
 );%0A  %7D e

Improve authors block