<commit_before>import React, { Component, PropTypes } from 'react';

import GlobalHeader from './GlobalHeader.js';
import RequireGoogleLogin from './RequireGoogleLogin/Main.js';
import TagManagerContainerSelector from './ContainerSelector/Main.js';
import Diff from './Diff/Main.js';

import {
    authGoogle,
    signOutFromGoogle
} from '../actions/google-core.js';
import {
    initGoogleTagManagerAPI,
    selectTagManagerContainer,
    selectTagManagerContainerVersion,
    clearTagManagerContainer,
    SET_TAG_MANAGER_CONTAINER_VERSION_AT_LEFT,
    SET_TAG_MANAGER_CONTAINER_VERSION_AT_RIGHT
} from '../actions/google-tag-manager.js';


export default class App extends Component {
    render(){
        const { dispatch } = this.props;

        var header = (
            <GlobalHeader
                selectedContainer={this.props.selectedConditions.tagManagerContainer}
                clearContainer={() => dispatch( clearTagManagerContainer() )}
            />
        ),
            sceneName,
            content;

        if( !this.props.isGoogleLoggedIn ){
            header = null;
            sceneName = 'require-google-login';
            content = (
                <RequireGoogleLogin loginGoogle={() => {
                    dispatch( authGoogle( false ) )
                        .then( () => dispatch( initGoogleTagManagerAPI() ) );
                }} />
            );
        }
        else if( !this.props.selectedConditions.tagManagerContainer ){
            sceneName = 'container-selector';
            content = (
                <TagManagerContainerSelector
                    tagManagerAccountsAndContainers={this.props.tagManagerAccountsAndContainers}
                    selectContainer={( container ) => dispatch( selectTagManagerContainer( container ) )}
                    />
            );
        }
        else if( this.props.tagManagerContainerVersions.length ){
            sceneName = 'diff';
            content = (
                <Diff
                    tagManagerContainerVersions={this.props.tagManagerContainerVersions}
                    selectedVersions={ [
                        this.props.selectedConditions.tagManagerContainerVersionAtLeft,
                        this.props.selectedConditions.tagManagerContainerVersionAtRight
                    ] }
                    selectionRoles={ [
                        SET_TAG_MANAGER_CONTAINER_VERSION_AT_LEFT,
                        SET_TAG_MANAGER_CONTAINER_VERSION_AT_RIGHT
                    ] }
                    selectVersion={( version, role ) => dispatch( selectTagManagerContainerVersion( version, role ) )}
                    result={this.props.diffResult}
                    />
            );
        }

        return (
            <div className={sceneName}>
                {header}
                {content}
            </div>
        );
    }
}

App.propTypes = {
    isGoogleLoggedIn: PropTypes.bool.isRequired
};
<commit_msg>IDEの構文警告にならってコードを微修正<commit_after>import React, { Component, PropTypes } from 'react';

import GlobalHeader from './GlobalHeader.js';
import RequireGoogleLogin from './RequireGoogleLogin/Main.js';
import TagManagerContainerSelector from './ContainerSelector/Main.js';
import Diff from './Diff/Main.js';

import {
    authGoogle,
    signOutFromGoogle
} from '../actions/google-core.js';
import {
    initGoogleTagManagerAPI,
    selectTagManagerContainer,
    selectTagManagerContainerVersion,
    clearTagManagerContainer,
    SET_TAG_MANAGER_CONTAINER_VERSION_AT_LEFT,
    SET_TAG_MANAGER_CONTAINER_VERSION_AT_RIGHT
} from '../actions/google-tag-manager.js';


export default class App extends Component {
    render(){
        const { dispatch } = this.props;

        var header = (
            <GlobalHeader
                selectedContainer={this.props.selectedConditions.tagManagerContainer}
                clearContainer={() => dispatch( clearTagManagerContainer() )}
            />
        ),
            sceneName,
            content;

        if( !this.props.isGoogleLoggedIn ){
            header = null;
            sceneName = 'require-google-login';
            content = (
                <RequireGoogleLogin
                    loginGoogle={() => dispatch( authGoogle( false ) ).then( () => dispatch( initGoogleTagManagerAPI() ) )}
                    />
            );
        }
        else if( !this.props.selectedConditions.tagManagerContainer ){
            sceneName = 'container-selector';
            content = (
                <TagManagerContainerSelector
                    tagManagerAccountsAndContainers={this.props.tagManagerAccountsAndContainers}
                    selectContainer={( container ) => dispatch( selectTagManagerContainer( container ) )}
                    />
            );
        }
        else if( this.props.tagManagerContainerVersions.length ){
            sceneName = 'diff';
            content = (
                <Diff
                    tagManagerContainerVersions={this.props.tagManagerContainerVersions}
                    selectedVersions={ [
                        this.props.selectedConditions.tagManagerContainerVersionAtLeft,
                        this.props.selectedConditions.tagManagerContainerVersionAtRight
                    ] }
                    selectionRoles={ [
                        SET_TAG_MANAGER_CONTAINER_VERSION_AT_LEFT,
                        SET_TAG_MANAGER_CONTAINER_VERSION_AT_RIGHT
                    ] }
                    selectVersion={( version, role ) => dispatch( selectTagManagerContainerVersion( version, role ) )}
                    result={this.props.diffResult}
                    />
            );
        }

        return (
            <div className={sceneName}>
                {header}
                {content}
            </div>
        );
    }
}

App.propTypes = {
    isGoogleLoggedIn: PropTypes.bool.isRequired
};

{'fraction_non_alphanumeric': 0.09029307131966796, 'fraction_numerical': 0.0, 'mean_word_length': 1.7981042654028436, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 25, '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': '4410645', 'n_tokens_mistral': 1475, 'n_tokens_neox': 1417, 'n_words': 228}