<commit_before>import React from 'react';
import utils from 'utils';
import emitter from 'utils/emitter';

// import {render} from 'react-dom';
let mountedInstance,
    defaultClassName = 'absolute-center modal text-center';

@utils.mixin(emitter)
class Modal extends React.Component {

  static propTypes = {
    show: React.PropTypes.bool,
    title: React.PropTypes.string,
    body: React.PropTypes.any,
    className: React.PropTypes.string
  }

  constructor(props, context){
    super(props, context);
    this.state = {
      show: props.show,
      title: props.title || '',
      body: props.body || '',
      className: [defaultClassName, props.className].join(' ')
    };
  }

  /**
   * Expose instance for singleton control
   */
  componentDidMount(){
    mountedInstance = this;
  }

  close(){
    this.setState({
      show: false
    });
  }

  render(){
    const show = 'show' in this.props ? this.props.show : this.state.show;
<commit_msg>fixed old modal state issue<commit_after>import React from 'react';
import utils from 'utils';
import emitter from 'utils/emitter';

// import {render} from 'react-dom';
let mountedInstance,
    defaultClassName = 'absolute-center modal text-center';

@utils.mixin(emitter)
class Modal extends React.Component {

  static propTypes = {
    show: React.PropTypes.bool,
    title: React.PropTypes.string,
    body: React.PropTypes.any,
    className: React.PropTypes.string
  }

  constructor(props, context){
    super(props, context);
    this.state = {
      show: props.show,
      title: props.title || '',
      body: props.body || '',
      className: [defaultClassName, props.className].join(' ')
    };
  }

  /**
   * Expose instance for singleton control
   */
  componentDidMount(){
    mountedInstance = this;
  }

  close(){
    this.setState({
      show: false
    });
  }

  render(){
    const { show } = this.state;

{'fraction_non_alphanumeric': 0.1341077085533263, 'fraction_numerical': 0.0, 'mean_word_length': 3.023354564755839, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '7467705', 'n_tokens_mistral': 581, 'n_tokens_neox': 566, 'n_words': 142}