<commit_before>import { Components, registerComponent, getFragment, withMessages } from 'meteor/vulcan:core';
import React from 'react';
import PropTypes from 'prop-types';
import { Comments } from "meteor/example-forum";

const CommentsEditForm = (props, context) => {
  return (
    <div className="comments-edit-form">
      <Components.SmartForm
        layout="elementOnly"
        collection={Comments}
        documentId={props.comment._id}
        successCallback={props.successCallback}
        cancelCallback={props.cancelCallback}
        showRemove={false}
        mutationFragment={getFragment('CommentsList')}
      />
    </div>
  )
}

CommentsEditForm.propTypes = {
  comment: PropTypes.object.isRequired,
  successCallback: PropTypes.func,
  cancelCallback: PropTypes.func
};

registerComponent('CommentsEditForm', CommentsEditForm, withMessages);<commit_msg>Fixed replacement of CommentsEditForm component<commit_after>import { Components, replaceComponent, getFragment, withMessages } from 'meteor/vulcan:core';
import React from 'react';
import PropTypes from 'prop-types';
import { Comments } from "meteor/example-forum";

const CommentsEditForm = (props, context) => {
  return (
    <div className="comments-edit-form">
      <Components.SmartForm
        layout="elementOnly"
        collection={Comments}
        documentId={props.comment._id}
        successCallback={props.successCallback}
        cancelCallback={props.cancelCallback}
        showRemove={false}
        mutationFragment={getFragment('CommentsList')}
      />
    </div>
  )
}

CommentsEditForm.propTypes = {
  comment: PropTypes.object.isRequired,
  successCallback: PropTypes.func,
  cancelCallback: PropTypes.func
};

replaceComponent('CommentsEditForm', CommentsEditForm, withMessages);
{'fraction_non_alphanumeric': 0.1132286995515695, 'fraction_numerical': 0.0, 'mean_word_length': 4.3283582089552235, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 11, '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': '6125271', 'n_tokens_mistral': 489, 'n_tokens_neox': 480, 'n_words': 93}