<commit_before>import React, { Component }     from 'react';
import { connect }              from 'react-redux';
import configuredRadium         from 'styles/configuredRadium.js';

import { add as addCookie }     from 'redux/modules/cookies/cookies.js';

import {
    StandardPage,
    RotatingLogo
} from 'components/index.js';

@configuredRadium
@connect(state => ({
    cookies: state.cookies
}), { addCookie })
export default class Frontpage extends Component {

    constructor(props) {
        super(props);
        this.state = {
            rotating: props.cookies.rotateLogo | 0
        };
    }

    toggleRotating = (event) => {
        event.preventDefault();
        const rotateLogo = this.state.rotating,
            newState = rotateLogo ? 0 : 1;

        this.props.addCookie('rotateLogo', newState, Infinity, '/').then((response) => {
            const state = response.result.rotateLogo | 0;
            if(state === newState) {
                this.setState({
                    rotating: !!newState
                });
            }
        });

    };

    render() {
        return (
            <StandardPage>
                <RotatingLogo rotate={ this.state.rotating } toggleRotating={ this.toggleRotating } />
            </StandardPage>
        );
    }
}<commit_msg>Removed state fuckup<commit_after>import React, { Component }     from 'react';
import { connect }              from 'react-redux';
import configuredRadium         from 'styles/configuredRadium.js';

import { add as addCookie }     from 'redux/modules/cookies/cookies.js';

import {
    StandardPage,
    RotatingLogo
} from 'components/index.js';

@configuredRadium
@connect(state => ({
    cookies: state.cookies
}), { addCookie })
export default class Frontpage extends Component {

    toggleRotating = (event) => {
        event.preventDefault();
        const rotateLogo = parseInt(this.props.cookies.rotateLogo, 10),
            newState = rotateLogo ? 0 : 1;

        this.props.addCookie('rotateLogo', newState, Infinity, '/');
    };

    render() {
        return (
            <StandardPage>
                <RotatingLogo rotate={ this.props.cookies.rotateLogo } toggleRotating={ this.toggleRotating } />
            </StandardPage>
        );
    }
}
{'fraction_non_alphanumeric': 0.12084993359893759, 'fraction_numerical': 0.0035413899955732625, 'mean_word_length': 2.178621659634318, 'pattern_counts': {'":': 0, '<': 9, '<?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': '6339351', 'n_tokens_mistral': 659, 'n_tokens_neox': 636, 'n_words': 133}