<commit_before>import React, { PropTypes } from 'react'
import { View, StyleSheet, Text } from 'react-native'

DrawerHeader.propTypes = {

}

export default function DrawerHeader (props) {
  return (
    <View>
      <Text>
        DrawerHeader
      </Text>
    </View>
  )
}

const styles = StyleSheet.create({

})<commit_msg>DrawerHeader<commit_after>import React, { PropTypes } from 'react'
import { View, StyleSheet, Text, Image } from 'react-native'
import { connect } from 'react-redux'
import { colors, fontSizes } from '~/styles'

DrawerHeader.propTypes = {
  photoURL: PropTypes.string.isRequired,
  displayName: PropTypes.string.isRequired,
  score: PropTypes.number.isRequired,
}

function DrawerHeader (props) {
  return (
    <View style={styles.container}>
      <Image style={styles.image} source={{uri: props.photoURL}}/>
      <Text style={styles.nameText}>{props.displayName}</Text>
      <Text style={styles.scoreText}>Score: {props.score}</Text>
    </View>
  )
}

const styles = StyleSheet.create({
  container: {
    height: 150,
    alignItems: 'center',
    paddingTop: 20,
    borderBottomWidth: 1,
    borderColor: colors.border,
  },
  image: {
    height: 60,
    width: 60,
    borderRadius: 30,
  },
  nameText: {
    fontSize: fontSizes.primary,
    color: colors.primary,
    marginTop: 8,
    marginBottom: 3,
  },
  scoreText: {
    fontSize: fontSizes.secondary,
    color: colors.secondary,
  }
})

function mapStateToProps ({users, authentication, scores}) {
  const { authedId } = authentication
  return {
    photoURL: users[authedId].photoURL,
    displayName: users[authedId].displayName,
    score: scores.usersScores[authedId],
  }
}

export default connect(
  mapStateToProps
)(DrawerHeader)
{'fraction_non_alphanumeric': 0.13068508923431202, 'fraction_numerical': 0.008059873344847437, 'mean_word_length': 3.6470588235294117, 'pattern_counts': {'":': 0, '<': 14, '<?xml version=': 0, '>': 14, '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': '7046463', 'n_tokens_mistral': 573, 'n_tokens_neox': 565, 'n_words': 125}