<commit_before>'use strict';

const React = require('react');
const Router = require('react-router');
const agent = require('../agent');
const marked = require('marked');
const store = require('../store');

const DeleteButton = props => {
  const del = () => {
    store.dispatch({
      type: 'DELETE_COMMENT',
      payload: agent.Comments.delete(props.slug, props.commentId),
      commentId: props.commentId
    });
  };

  if (props.show) {
    return (
      <span className="mod-options">
        <i className="ion-trash-a" onClick={del}></i>
      </span>
    );
  }
  return;
};

const Comment = props => {
  const comment = props.comment;
  const show = props.currentUser &&<commit_msg>make sure delete button explicitly returns null<commit_after>'use strict';

const React = require('react');
const Router = require('react-router');
const agent = require('../agent');
const marked = require('marked');
const store = require('../store');

const DeleteButton = props => {
  const del = () => {
    store.dispatch({
      type: 'DELETE_COMMENT',
      payload: agent.Comments.delete(props.slug, props.commentId),
      commentId: props.commentId
    });
  };

  if (props.show) {
    return (
      <span className="mod-options">
        <i className="ion-trash-a" onClick={del}></i>
      </span>
    );
  }
  return null;
};

const Comment = props => {
  const comment = props.comment;
  const show = props.currentUser &&
{'fraction_non_alphanumeric': 0.16771488469601678, 'fraction_numerical': 0.0, 'mean_word_length': 3.211764705882353, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 17, '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': '6479831', 'n_tokens_mistral': 436, 'n_tokens_neox': 431, 'n_words': 105}