<commit_before>import './appContent.scss';
import React, { Component } from 'react';
import { GennyBucketView, GennyForm, GennyTable, GennyList } from '../../';
import { any } from 'prop-types';
import { LayoutLoader } from 'utils/genny/layout-loader';

class AppContent extends Component {

    static defaultProps = {
    }

    static propTypes = {
      children: any,
    };

    state = {
    }

    render() {

        const { layout, children, style } = this.props;

        let layoutContent = null;

        if(layout.currentView && layout.currentView.dataCode) {

            // we need to show the table view
            if(layout.currentView.code == "TABLE_VIEW") {
                layoutContent = <GennyTable root={layout.currentView.dataCode}/>
            }
            // we need to show the bucket view
            else if (layout.currentView.code == "BUCKET_VIEW") {
                layoutContent = <GennyBucketView root={layout.currentView.dataCode} />
            }
            else if (layout.currentView.code == "LIST_VIEW") {
                layoutContent = <GennyList root={layout.currentView.dataCode} />
            }
            else if (layout.currentView.code == "FORM_VIEW") {
                layoutContent = <GennyForm root={layout.currentView.dataCode} showProgress={true}/>
            }
        }
        else if (layout.currentSublayout) {
            layoutContent = <LayoutLoader layout={layout.currentSublayout} />
        }

        layoutContent = layoutContent || children;

        const componentStyle = {
            ...style,
        };

        return (
            <div className="app-content" style={componentStyle}>
                {layoutContent}
            </div>
        );
    }
}

export default AppContent;<commit_msg>fixed sublayout change reducer<commit_after>import './appContent.scss';
import React, { Component } from 'react';
import { GennyBucketView, GennyForm, GennyTable, GennyList } from '../../';
import { any } from 'prop-types';
import { LayoutLoader } from 'utils/genny/layout-loader';

class AppContent extends Component {

    static defaultProps = {
    }

    static propTypes = {
      children: any,
    };

    state = {
    }

    render() {

        const { layout, children, style } = this.props;

        let layoutContent = null;

        if(layout.currentView && layout.currentView.dataCode) {

            // we need to show the table view
            if(layout.currentView.code == "TABLE_VIEW") {
                layoutContent = <GennyTable root={layout.currentView.dataCode}/>
            }
            // we need to show the bucket view
            else if (layout.currentView.code == "BUCKET_VIEW") {
                layoutContent = <GennyBucketView root={layout.currentView.dataCode} />
            }
            else if (layout.currentView.code == "LIST_VIEW") {
                layoutContent = <GennyList root={layout.currentView.dataCode} />
            }
            else if (layout.currentView.code == "FORM_VIEW") {
                layoutContent = <GennyForm root={layout.currentView.dataCode} showProgress={true}/>
            }
        }
        else if (layout.currentSublayout && layout.currentSublayout.layout) {
            layoutContent = <LayoutLoader layout={layout.layout.currentSublayout.layout} />
        }

        layoutContent = layoutContent || children;

        const componentStyle = {
            ...style,
        };

        return (
            <div className="app-content" style={componentStyle}>
                {layoutContent}
            </div>
        );
    }
}

export default AppContent;
{'fraction_non_alphanumeric': 0.11507607192254495, 'fraction_numerical': 0.0, 'mean_word_length': 1.9884297520661156, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, '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': '3746548', 'n_tokens_mistral': 972, 'n_tokens_neox': 947, 'n_words': 213}