<commit_before>﻿require("./res/DailyPage.less");

var React = require("react");
var DailyManager = require("./controllers/DailyManager");

var Carousel = require("./components/Carousel");
var FlexView = require("./components/FlexView");
var ArticleView = require("./components/ArticleView");

/**
 * 知乎日报页面。
 */
var DailyPage = React.createClass(
{
    getInitialState()
    {
        return {
            topStories: []
        };
    },

    componentDidMount: function ()
    {
        DailyManager.getTopStories(function (data)
        {
            if (data && this.isMounted())
            {
                this.setState(
                {
                    topStories: data.stories
                });
            }
        }.bind(this));
    },

    render : function()
    {
        var page =
            <div className="DailyPage container-fluid">
                <div className="CarouselContainer container-fluid">
                <Carousel data={this.state.topStories}/>
                </div>
                <div className="FlexContainer container-fluid">
                    <FlexView />
                </div>
            </div>;
        return page;
    }
});

module.exports = DailyPage;<commit_msg>format<commit_after>﻿require("./res/DailyPage.less");

var React = require("react");
var DailyManager = require("./controllers/DailyManager");

var Carousel = require("./components/Carousel");
var FlexView = require("./components/FlexView");
var ArticleView = require("./components/ArticleView");

/**
 * 知乎日报页面。
 */
var DailyPage = React.createClass(
{
    getInitialState()
    {
        return {
            topStories: []
        };
    },

    componentDidMount: function ()
    {
        DailyManager.getTopStories(function (data)
        {
            if (data && this.isMounted())
            {
                this.setState(
                {
                    topStories: data.stories
                });
            }
        }.bind(this));
    },

    render : function()
    {
        var page =
            <div className="DailyPage container-fluid">
                <div className="CarouselContainer container-fluid">
                    <Carousel data={this.state.topStories}/>
                </div>
                <div className="FlexContainer container-fluid">
                    <FlexView />
                </div>
            </div>;
        return page;
    }
});

module.exports = DailyPage;
{'fraction_non_alphanumeric': 0.13366133661336613, 'fraction_numerical': 0.0, 'mean_word_length': 1.626480086114101, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 19, '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': '4108123', 'n_tokens_mistral': 689, 'n_tokens_neox': 647, 'n_words': 113}