<commit_before>'use strict';

import React from 'react';
import Header from './common/header'

class App extends React.Component {
    render() {
        return (<div>
                <Header />
                {this.props.children}
                </div>)
    }
}

App.path = '/';

export default App<commit_msg>Initially we get the user weight in the top level app component<commit_after>'use strict';

import React from 'react';
import Header from './common/header';
import AppActions from '../actions/AppActions';
import AppStore from '../stores/AppStore';

class App extends React.Component {

    componentWillMount() {
        const Component = this;
        AppActions.getWeight();
        
        Component.state = {
            weight: []
        }

        AppStore.addChangeListener(function() {
            Component.setState({weight: AppStore.getWeight()});
        });
    }

    render() {
        return (
            <div>
                <Header weight={this.state.weight}/>
                {this.props.children}
            </div>
        )
    }
}

App.path = '/';

export default App
{'fraction_non_alphanumeric': 0.12386980108499096, 'fraction_numerical': 0.0, 'mean_word_length': 1.9131578947368422, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '7635799', 'n_tokens_mistral': 301, 'n_tokens_neox': 292, 'n_words': 77}