<commit_before>//@flow

import React, {Component} from 'react';
import {
    StyleSheet,
    Text,
    View,
    Image,
} from 'react-native';

import * as GLOBAL from '../utils/Globals';

const styles = StyleSheet.create({
    container: {
        backgroundColor: 'white',
        padding: 8,
        flexDirection: 'row',
    },
    profile: {
        width: 50,
        height: 50,
        borderRadius: 3,
    },
    tweetContent: {
        marginLeft: 8,
        marginRight: 8,
        flexDirection: 'column',
    },
    nameContainer: {
        flexDirection: 'row',
        alignItems: 'flex-end'
    },
    name: {
        color: GLOBAL.COLOR.BLACK_54,
        fontSize: 16,
        fontWeight: '500'
    },
    screenName: {
        marginLeft: 8,
        color: GLOBAL.COLOR.BLACK_54,
        fontSize: 14,
    },
    tweetText: {
        color: GLOBAL.COLOR.BLACK_54,
        fontSize: 16,
        flexWrap: 'wrap',
    },
    tweetImage: {
        marginTop: 8,
        marginRight: 8,
        height: 150,
        borderRadius: 3,
    },
});

class Tweet extends Component {
    render() {
        let tweet = this.props.tweet;
        let image = null;
        if (tweet.entities.media && tweet.entities.media.length > 0) {
            image = (
                <View>
                    <Image
                        style={styles.tweetImage}
                        resizeMode='cover'
                        source={{uri: tweet.entities.media[0].media_url_https}}
                    />
                </View>
            );
        }
        return (
            <View style={styles.container}>
                <Image
                    style={styles.profile}
                    source={{uri: tweet.user.profile_image_url_https}}
                />
                <View style={styles.tweetContent}>
                    <View style={styles.nameContainer}>
                        <Text style={styles.name}>{tweet.user.name}</Text>
                        <Text style={styles.screenName}>@{tweet.<EMAIL>.screen_name}</Text>
                    </View>
                    <View>
                        <Text style={styles.tweetText}>{tweet.text}</Text>
                    </View>
                    {image}
                </View>
            </View>
        );
    }
}

module.exports = Tweet;<commit_msg>Fix image issue<commit_after>//@flow

import React, {Component} from 'react';
import {
    StyleSheet,
    Text,
    View,
    Image,
} from 'react-native';

import * as GLOBAL from '../utils/Globals';

const styles = StyleSheet.create({
    container: {
        backgroundColor: 'white',
        padding: 8,
        flexDirection: 'row',
    },
    profile: {
        width: 50,
        height: 50,
        borderRadius: 3,
    },
    tweetContent: {
        flex: 1,
        marginLeft: 8,
        flexDirection: 'column',
    },
    nameContainer: {
        flexDirection: 'row',
        alignItems: 'flex-end'
    },
    name: {
        color: GLOBAL.COLOR.BLACK_54,
        fontSize: 16,
        fontWeight: '500'
    },
    screenName: {
        marginLeft: 8,
        color: GLOBAL.COLOR.BLACK_54,
        fontSize: 14,
    },
    tweetText: {
        color: GLOBAL.COLOR.BLACK_54,
        fontSize: 16,
        flexWrap: 'wrap',
    },
    tweetImageContainer: {
        paddingTop: 8,
    },
    tweetImage: {
        height: 150,
        borderRadius: 3,
    },
});

class Tweet extends Component {
    render() {
        let tweet = this.props.tweet;
        let image = null;
        if (tweet.entities.media && tweet.entities.media.length > 0) {
            image = (
                <View style={styles.tweetImageContainer}>
                    <Image
                        style={styles.tweetImage}
                        resizeMode='cover'
                        source={{uri: tweet.entities.media[0].media_url_https}}
                    />
                </View>
            );
        }
        return (
            <View style={styles.container}>
                <Image
                    style={styles.profile}
                    source={{uri: tweet.user.profile_image_url_https}}
                />
                <View style={styles.tweetContent}>
                    <View style={styles.nameContainer}>
                        <Text style={styles.name}>{tweet.user.name}</Text>
                        <Text style={styles.screenName}>@{tweet.user.screen_name}</Text>
                    </View>
                    <Text style={styles.tweetText}>{tweet.text}</Text>
                    {image}
                </View>
            </View>
        );
    }
}

module.exports = Tweet;
{'fraction_non_alphanumeric': 0.12287497310092532, 'fraction_numerical': 0.01355713363460297, 'mean_word_length': 1.3368526897938662, 'pattern_counts': {'":': 0, '<': 38, '<?xml version=': 0, '>': 40, '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': '5729742', 'n_tokens_mistral': 1394, 'n_tokens_neox': 1307, 'n_words': 249}