<commit_before>import React, { Component } from 'react';
import classNames from 'classnames/bind';
import styles from '../css/components/user';
const cx = classNames.bind(styles);
import { Card, Layout, Button } from 'antd';
const { Header, Footer, Sider, Content } = Layout;
import { Link } from 'react-router';
import en1 from '../../locale-data/en.json';
import fr1 from '../../locale-data/fr.json';
import lang from '../utils/lang'


var trad;
trad = lang() == 'fr' ? fr1 : en1

class Film extends Component {
    constructor(props) {
        super(props)
    }

    render() {
        var btn = ""
        if (this.props.cookieUser._id == this.props.user._id) {
            btn = <Link to={ '/user/' + this.props.user._id + '/update' }><Button type='primary' className={cx('button')} style={{ width: 100, marginBottom: 30, textAlign: 'center' }}>{trad.updatelol}</Button></Link>
        }
        return (
            <Layout style={{ backgroundColor: 'white'}}>
                <Content style={{ margin: 'auto' }}>
                    <Card style={{ width: 250 }} bodyStyle={{ padding: 0 }} >
                        <div className={cx('custom-image')}>
                            <img alt="example" width="100%" src={this.props.user.profile.picture} />
                        </div>
                        <div className={cx('custom-card')}>
                            <h3>{this.props.user.profile.username}</h3>
                            <p>{this.props.user.profile.firstname}</p>
                            <p>{this.props.user.profile.lastname}</p>
                        </div>
                    </Card>
                    <div style={{ textAlign: 'center', marginTop: 20 }}>{btn}</div>
                </Content>
            </Layout>
        )
    }
}

export default Film;<commit_msg>wrong user fixed<commit_after>import React, { Component } from 'react';
import classNames from 'classnames/bind';
import styles from '../css/components/user';
const cx = classNames.bind(styles);
import { Card, Layout, Button } from 'antd';
const { Header, Footer, Sider, Content } = Layout;
import { Link } from 'react-router';
import en1 from '../../locale-data/en.json';
import fr1 from '../../locale-data/fr.json';
import lang from '../utils/lang'


var trad;
trad = lang() == 'fr' ? fr1 : en1

class Film extends Component {
    constructor(props) {
        super(props)
    }

    render() {
        var btn = ""
        if (this.props.user && this.props.cookieUser._id == this.props.user._id) {
            btn = <Link to={ '/user/' + this.props.user._id + '/update' }><Button type='primary' className={cx('button')} style={{ width: 100, marginBottom: 30, textAlign: 'center' }}>{trad.updatelol}</Button></Link>
        }
        var username = "user not found"
        var firstname = ""
        var lastname = ""
        var imgsrc="https://uos.edu.pk/assets/backend/images/staff/imagenotfound.svg"

        if (this.props && this.props.user){
            var username = this.props.user.profile.username
            var firstname = this.props.user.profile.firstname
            var lastname = this.props.user.profile.lastname
            var imgsrc = this.props.user.profile.picture
        }
        return (
            <Layout style={{ backgroundColor: 'white'}}>
                <Content style={{ margin: 'auto' }}>
                    <Card style={{ width: 250 }} bodyStyle={{ padding: 0 }} >
                        <div className={cx('custom-image')}>
                            <img alt="example" width="100%" src={imgsrc} />
                        </div>
                        <div className={cx('custom-card')}>
                            <h3>{username}</h3>
                            <p>{firstname}</p>
                            <p>{lastname}</p>
                        </div>
                    </Card>
                    <div style={{ textAlign: 'center', marginTop: 20 }}>{btn}</div>
                </Content>
            </Layout>
        )
    }
}

export default Film;
{'fraction_non_alphanumeric': 0.16093672147483806, 'fraction_numerical': 0.009965122072745391, 'mean_word_length': 1.8234880450070323, 'pattern_counts': {'":': 0, '<': 49, '<?xml version=': 0, '>': 49, 'https://': 1, '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': '6576374', 'n_tokens_mistral': 1163, 'n_tokens_neox': 1125, 'n_words': 272}