import React from 'react';
import PropTypes from 'prop-types';
import { TableCell } from 'material-ui/Table';
import withCountryName from '../common/hoc/withCountryName';
import EoiCountryCell from '../eois/cells/eoiCountryCell';

const CountriesCell = (props) => {
  const { countries } = props;

  return (
    <TableCell>
      {countries && countries.map(item =>
          (<div key={item}><EoiCountryCell code={item} />{', '}</div>))}
    </TableCell>
  );
};

CountriesCell.propTypes = {
  countries: PropTypes.array.isRequired,
};

export default withCountryName(CountriesCell);

@@ -1,12 +1,35 @@
+import R from 'ramda';%0A
 import React
@@ -391,18 +391,16 @@
         
-  
 (%3Cdiv ke
@@ -443,12 +443,49 @@
  /%3E%7B
-', '
+R.last(countries) !== item ? ', ' : null 
 %7D%3C/d

remove extra comma