<commit_before>import React, { PropTypes } from 'react'
import { View, ScrollView, Switch, Picker, Text, TouchableOpacity, Image } from 'react-native'
import { connect } from 'react-redux'
import MapActions from '../Redux/MapRedux'
import { Actions as NavigationActions } from 'react-native-router-flux'
import { Colors, Images, Metrics } from '../Themes'
import { CheckBox, Card, Button, List, ListItem, ButtonGroup } from 'react-native-elements'
import SettingsList from 'react-native-settings-list';

import Icon from 'react-native-vector-icons/FontAwesome'

// Styles
import styles from './Styles/SettingsScreenStyle'

class MeasurementScreen extends React.Component {
  render () {
    const { unitOfMeasurement } = this.props

    return (
      <View style={styles.mainContainer}>
        <Image source={Images.background} style={styles.backgroundImage} resizeMode='stretch' />
        <ScrollView style={styles.container}>
          <SettingsList>
            {['Miles', 'Kilometers'].map((unit, index) =>
              <SettingsList.Item
                title={unit}
                key={index}
                // onPress={() => setMapBrand(mapName)}
                arrowIcon={ ( <Icon name="check" size={14} color={(unitOfMeasurement === unit) ? "blue" : "rgba(255,255,255,0)"} /> ) }
              />
            )}
          </SettingsList>
        </ScrollView>
      </View>
    )
  }
}

const mapStateToProps = (state) => {
  return {
    unitOfMeasurement: state.map.unitOfMeasurement,
  }
}

const mapDispatchToProps = (dispatch) => {
  return {
  }
}

export default connect(mapStateToProps, mapDispatchToProps)(MeasurementScreen)<commit_msg>Fix redux Unit of measurement<commit_after>import React, { PropTypes } from 'react'
import { View, ScrollView, Switch, Picker, Text, TouchableOpacity, Image } from 'react-native'
import { connect } from 'react-redux'
import MapActions from '../Redux/MapRedux'
import { Actions as NavigationActions } from 'react-native-router-flux'
import { Colors, Images, Metrics } from '../Themes'
import { CheckBox, Card, Button, List, ListItem, ButtonGroup } from 'react-native-elements'
import SettingsList from 'react-native-settings-list';

import Icon from 'react-native-vector-icons/FontAwesome'

// Styles
import styles from './Styles/SettingsScreenStyle'

class MeasurementScreen extends React.Component {
  render () {
    const { unitOfMeasurement, setUnitOfMeasurement } = this.props

    return (
      <View style={styles.mainContainer}>
        <Image source={Images.background} style={styles.backgroundImage} resizeMode='stretch' />
        <ScrollView style={styles.container}>
          <SettingsList>
            {['Miles', 'Kilometers'].map((unit, index) =>
              <SettingsList.Item
                title={unit}
                key={index}
                onPress={() => setUnitOfMeasurement(unit)}
                arrowIcon={ ( <Icon name="check" size={14} color={(unitOfMeasurement === unit) ? "blue" : "rgba(255,255,255,0)"} /> ) }
              />
            )}
          </SettingsList>
        </ScrollView>
      </View>
    )
  }
}

const mapStateToProps = (state) => {
  return {
    unitOfMeasurement: state.map.unitOfMeasurement,
  }
}

const mapDispatchToProps = (dispatch) => {
  return {
    setUnitOfMeasurement: (unitOfMeasurement) => dispatch(MapActions.setUnitOfMeasurement(unitOfMeasurement))
  }
}

export default connect(mapStateToProps, mapDispatchToProps)(MeasurementScreen)
{'fraction_non_alphanumeric': 0.13158652461848547, 'fraction_numerical': 0.006910452058738843, 'mean_word_length': 3.216019417475728, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 30, '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': '7050356', 'n_tokens_mistral': 1034, 'n_tokens_neox': 993, 'n_words': 223}