<commit_before>import React, {Component} from 'react';
import '../App.css';
import '../Home.css';

const axios = require('axios');
const jwt = require('jsonwebtoken');

export default class About extends Component {
    constructor(props){
        super(props);

        this.state = {
            userEntry: '',
            emailEntry: '',
            passEntry: '',
            confirmPassEntry: ''
        };

        this.handleChange = this.handleChange.bind(this);
        this.handleSubmit = this.handleSubmit.bind(this);
    }

    handleChange(event){
        this.setState({ [event.target.name]: event.target.value });
    }

    handleSubmit(event){
        const { userEntry, emailEntry, passEntry, confirmPassEntry } = this.state;

        let form = {
            user: userEntry,
            email: emailEntry,
            pass: <PASSWORD>,
            confirmPass: confirmPassEntry,
            error: ''
        };

        axios.post('http://localhost:3001/users/signup', form)
        .then(result => {
            if(result.data.status === 'success'){
                jwt.verify(result.data.data, process.env.REACT_APP_TOKEN, (err, decoded) => {
                    console.log(decoded);
                    localStorage.setItem('impostersyndrome', JSON.stringify(decoded));
                    window.location.href = '/';
                });
            }else{
                console.log(result.data);

                this.setState({ error: result.data.data.substr(7) });
            }
        });

        event.preventDefault();
    }

    render() {
        return (
            <main className="home">
                <section className="body">
                    {/* <iframe src="https://www.youtube.com/embed/OJk_HUyzZNk" frameBorder="0" allowFullScreen></iframe> */}
                    <article><commit_msg>🚨 Errors show on view<commit_after>import React, {Component} from 'react';
import '../App.css';
import '../Home.css';

const axios = require('axios');
const jwt = require('jsonwebtoken');

export default class About extends Component {
    constructor(props){
        super(props);

        this.state = {
            userEntry: '',
            emailEntry: '',
            passEntry: '',
            confirmPassEntry: '',
            error: ''
        };

        this.handleChange = this.handleChange.bind(this);
        this.handleSubmit = this.handleSubmit.bind(this);
    }

    handleChange(event){
        this.setState({ [event.target.name]: event.target.value });
    }

    handleSubmit(event){
        const { userEntry, emailEntry, passEntry, confirmPassEntry } = this.state;

        let form = {
            user: userEntry,
            email: emailEntry,
            pass: <PASSWORD>,
            confirmPass: confirmPassEntry
        };

        axios.post('http://localhost:3001/users/signup', form)
        .then(result => {
            if(result.data.status === 'success'){
                jwt.verify(result.data.data, process.env.REACT_APP_TOKEN, (err, decoded) => {
                    console.log(decoded);
                    localStorage.setItem('impostersyndrome', JSON.stringify(decoded));
                    window.location.href = '/';
                });
            }else{
                console.log(result.data);

                this.setState({ error: result.data.data.substr(7) });
            }
        });

        event.preventDefault();
    }

    render() {
        return (
            <main className="home">
                <section className="body">
                    {/* <iframe src="https://www.youtube.com/embed/OJk_HUyzZNk" frameBorder="0" allowFullScreen></iframe> */}
                    <article>
{'fraction_non_alphanumeric': 0.1386326641345632, 'fraction_numerical': 0.0032555615843733042, 'mean_word_length': 1.7659414853713429, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 19, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, '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': '1035790', 'n_tokens_mistral': 1033, 'n_tokens_neox': 987, 'n_words': 171}