<commit_before>import React from 'react';

import { preventDefault } from '../utils';
import UserName from './user-name';


const renderLike = (item, i, items) => (
  <li key={item.id} className="post-like">
    {item.id !== 'more-likes' ? (
      <UserName user={item} />
    ) : (
      <a className="more-post-likes-link" onClick={preventDefault(item.showMoreLikes)}>{item.omittedLikes} other people</a>
    )}

    {i < items.length - 2 ? (
      ', '
    ) : i === items.length - 2 ? (
      ' and '
    ) : (
      ' liked this '
    )}
  </li>
);

export default ({ likes, showMoreLikes, post }) => {
  if (!likes.length) {
    return <div />;
  }

  // Make a copy to prevent props modification
  const likeList = [...likes];

  if (post.omittedLikes) {
    likeList.push({
      id:            'more-likes',
      omittedLikes:  post.omittedLikes,
      showMoreLikes: () => showMoreLikes(post.id)
    });
  }

  const renderedLikes = likeList.map(renderLike);

  return (
    <div className="post-likes">
      <i className="fa fa-heart icon" />
      <ul className="post-likes-list">{renderedLikes}</ul>
    </div>
  );
};
<commit_msg>Update the post like icon<commit_after>import React from 'react';

import { preventDefault } from '../utils';
import UserName from './user-name';
import { Icon } from './fontawesome-icons';


const renderLike = (item, i, items) => (
  <li key={item.id} className="post-like">
    {item.id !== 'more-likes' ? (
      <UserName user={item} />
    ) : (
      <a className="more-post-likes-link" onClick={preventDefault(item.showMoreLikes)}>{item.omittedLikes} other people</a>
    )}

    {i < items.length - 2 ? (
      ', '
    ) : i === items.length - 2 ? (
      ' and '
    ) : (
      ' liked this '
    )}
  </li>
);

export default ({ likes, showMoreLikes, post }) => {
  if (!likes.length) {
    return <div />;
  }

  // Make a copy to prevent props modification
  const likeList = [...likes];

  if (post.omittedLikes) {
    likeList.push({
      id:            'more-likes',
      omittedLikes:  post.omittedLikes,
      showMoreLikes: () => showMoreLikes(post.id)
    });
  }

  const renderedLikes = likeList.map(renderLike);

  return (
    <div className="post-likes">
      <Icon name="heart" className="icon" />
      <ul className="post-likes-list">{renderedLikes}</ul>
    </div>
  );
};

{'fraction_non_alphanumeric': 0.17772108843537415, 'fraction_numerical': 0.0017006802721088435, 'mean_word_length': 2.5436746987951806, 'pattern_counts': {'":': 0, '<': 27, '<?xml version=': 0, '>': 31, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1980827', 'n_tokens_mistral': 824, 'n_tokens_neox': 805, 'n_words': 167}