<commit_before>import React, {Component} from '../base-react'

export default class MetaNavigatorRender extends Component {
  render () {
    const {rootComponent, uri, getComponentAtTop} = this.props
    const {componentAtTop} = getComponentAtTop(rootComponent, uri)
    const Module = componentAtTop.component

    return (
      <Module {...componentAtTop.props} />
    )
  }
}

MetaNavigatorRender.propTypes = {
  uri: React.PropTypes.object.isRequired,
  getComponentAtTop: React.PropTypes.func.isRequired,
  rootComponent: React.PropTypes.func.isRequired
}<commit_msg>back button<commit_after>import React, {Component} from '../base-react'
import {FlatButton} from 'material-ui'
import {navigateUp} from '../actions/router'
import {connect} from 'react-redux'
import {bindActionCreators} from 'redux'

class MetaNavigatorRender extends Component {
  onBack () {
    this.props.navigateUp()
  }

  render () {
    const {rootComponent, uri, getComponentAtTop} = this.props
    const {componentAtTop} = getComponentAtTop(rootComponent, uri)
    const Module = componentAtTop.component

    return (
      <div>
        <Module {...componentAtTop.props} />
        {uri && uri.count() > 1 && <FlatButton onClick={ () => this.onBack() } style={styles.backButton} label='Back'/>}
      </div>
    )
  }
}

MetaNavigatorRender.propTypes = {
  uri: React.PropTypes.object.isRequired,
  getComponentAtTop: React.PropTypes.func.isRequired,
  rootComponent: React.PropTypes.func.isRequired,
  navigateUp: React.PropTypes.func.isRequired
}

const styles = {
  backButton: {
    position: 'absolute',
    top: 0,
    right: 0,
    backgroundColor: '#cccccc'
  }
}

export default connect(state => state, dispatch => bindActionCreators({navigateUp}, dispatch))(MetaNavigatorRender)
{'fraction_non_alphanumeric': 0.1262683201803833, 'fraction_numerical': 0.0016910935738444193, 'mean_word_length': 4.08595988538682, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 12, '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': '3869435', 'n_tokens_mistral': 548, 'n_tokens_neox': 541, 'n_words': 115}