{"size": 1358, "ext": "js", "max_stars_repo_path": "client/app/components/ProfileCard.js", "max_stars_repo_name": "florianporada/moovel_testme", "max_stars_repo_stars_event_min_datetime": "2017-09-18T13:45:14.000Z", "max_stars_repo_stars_event_max_datetime": "2017-09-18T13:45:14.000Z", "max_issues_repo_path": "client/app/components/ProfileCard.js", "max_issues_repo_name": "florianporada/moovel_testme", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "client/app/components/ProfileCard.js", "max_forks_repo_name": "florianporada/moovel_testme", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 1, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 28.2916666667, "max_line_length": 108, "alphanum_fraction": 0.6038291605}
import React from 'react';
import { Text, View } from 'react-native';
import { Badge, Avatar } from 'react-native-elements';
import PropTypes from 'prop-types';

import helper from '../helper';
import { styles } from '../config/styles';

class ProfileCard extends React.Component {
  constructor(props) {
    super(props);
  }

  render() {
    const { modalContent } = this.props;

    return (
      <View style={[styles.profileCardGeneric, ]}>
        <View>
          <Avatar
            large
            rounded
            source={{uri: modalContent.avatar_url}}
            activeOpacity={0.7}
          />
          <Badge
            value={helper.formatNumber(modalContent.followers)}
            textStyle={styles.badgeText}
            containerStyle={[styles.badgeContainer]}
          />
        </View>
        <View style={styles.profileCardInfo}>
          <Text><Text style={styles.bold}>Username: </Text>{modalContent.login}</Text>
          <Text><Text style={styles.bold}>Name: </Text>{modalContent.name}</Text>
          <Text><Text style={styles.bold}>Joined: </Text>{helper.formatDate(modalContent.created_at)}</Text>
          <Text><Text style={styles.bold}>Bio: </Text>{modalContent.bio}</Text>
        </View>
      </View>
    );
  }
}

ProfileCard.propTypes = {
  modalContent: PropTypes.object
};

export default ProfileCard;
