<commit_before>import React, { Component, PropTypes, createElement } from 'react';
import { createDevTools } from 'redux-devtools';
import LogMonitor from 'redux-devtools-log-monitor';
import SliderMonitor from 'redux-slider-monitor';
import InspectorMonitor from 'redux-devtools-inspector';
import DispatchMonitor from 'redux-devtools-dispatch';
import ChartMonitor from 'redux-devtools-chart-monitor';

export const sideMonitors = [
  { key: 'LogMonitor', title: 'Log monitor' },
  { key: 'InspectorMonitor', title: 'Inspector' },
  { key: 'ChartMonitor', title: 'Chart' }
];

function getMonitor(type, props) {
  switch (type) {
    case 'SliderMonitor':
      return createElement(SliderMonitor);
    case 'InspectorMonitor':
      return createElement(InspectorMonitor, {
        shouldPersistState: false, isLightTheme: false, theme: 'nicinabox'
      });
    case 'DispatchMonitor':
      return createElement(DispatchMonitor, { dispatchFn: props.dispatchFn });
    case 'ChartMonitor':
      return createElement(ChartMonitor, {
        defaultIsVisible: true, invertTheme: true,
        tooltipOptions: {
          style: {
            'background-color': '#ffffff',
            'opacity': '0.9',
            'border-radius': '5px',
            'padding': '5px'
          }
        }
      });
    default:
      return createElement(LogMonitor, { preserveScrollTop: false });
  }
}

export default class extends Component {
  static propTypes = {
    monitor: PropTypes.string
  };

  shouldComponentUpdate(nextProps) {
    return nextProps.monitor !== this.props.monitor;
  }

  render() {
    const { monitor, ...rest } = this.props;
    const DevTools = createDevTools(getMonitor(monitor, rest));
    return <DevTools {...rest} />;<commit_msg>Use `InspectorMonitor` by default<commit_after>import React, { Component, PropTypes, createElement } from 'react';
import { createDevTools } from 'redux-devtools';
import LogMonitor from 'redux-devtools-log-monitor';
import SliderMonitor from 'redux-slider-monitor';
import InspectorMonitor from 'redux-devtools-inspector';
import DispatchMonitor from 'redux-devtools-dispatch';
import ChartMonitor from 'redux-devtools-chart-monitor';

export const sideMonitors = [
  { key: 'LogMonitor', title: 'Log monitor' },
  { key: 'InspectorMonitor', title: 'Inspector' },
  { key: 'ChartMonitor', title: 'Chart' }
];

function getMonitor(type, props) {
  switch (type) {
    case 'LogMonitor':
      return createElement(LogMonitor, { preserveScrollTop: false });
    case 'SliderMonitor':
      return createElement(SliderMonitor);
    case 'DispatchMonitor':
      return createElement(DispatchMonitor, { dispatchFn: props.dispatchFn });
    case 'ChartMonitor':
      return createElement(ChartMonitor, {
        defaultIsVisible: true, invertTheme: true,
        tooltipOptions: {
          style: {
            'background-color': '#ffffff',
            'opacity': '0.9',
            'border-radius': '5px',
            'padding': '5px'
          }
        }
      });
    default:
      return createElement(InspectorMonitor, {
        shouldPersistState: false, isLightTheme: false, theme: 'nicinabox'
      });
  }
}

export default class extends Component {
  static propTypes = {
    monitor: PropTypes.string
  };

  shouldComponentUpdate(nextProps) {
    return nextProps.monitor !== this.props.monitor;
  }

  render() {
    const { monitor, ...rest } = this.props;
    const DevTools = createDevTools(getMonitor(monitor, rest));
    return <DevTools {...rest} />;
{'fraction_non_alphanumeric': 0.12478729438457176, 'fraction_numerical': 0.0022688598979013048, 'mean_word_length': 3.419799498746867, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '4098014', 'n_tokens_mistral': 1005, 'n_tokens_neox': 997, 'n_words': 243}