<commit_before>import React, { Component, PropTypes } from 'react';
import Slider from 'react-slick';
import { ts2yyyymmdd } from '../lib/date-transformer';
import { imageComposer } from '../lib/image-composer.js';

if (process.env.BROWSER) {
    require("./TopNews.css");
}

export default class TopNews extends Component {
    constructor(props, context) {
        super(props, context)
        this.state = {
            autoplaySpeed: 4500,
            speed: 1500
        };
    }
    componentDidMount() {
        // this.handleResize()
        // window.addEventListener('resize', this.handleResize);
    }
    _onClick(e) {
        e.stopPropagation();
        // hack for stopping autoplay right away after clicking
        this.state.autoplaySpeed = 10000000;
        this.state.speed = 10000000;
        this.forceUpdate();
    }
    render() {
        const { topnews, device } = this.props
        let settings = {
            dots: true,
            infinite: true,
            speed: this.state.speed,
            autoplay: true,
            autoplaySpeed: this.state.autoplaySpeed,
            arrows: device === 'desktop' ? true : false,
            slidesToShow: 1,
            slidesToScroll: 1,
            lazyLoad: false,
            useCSS: true
        };<commit_msg>enable carousel arrows on mobile<commit_after>import React, { Component, PropTypes } from 'react';
import Slider from 'react-slick';
import { ts2yyyymmdd } from '../lib/date-transformer';
import { imageComposer } from '../lib/image-composer.js';

if (process.env.BROWSER) {
    require("./TopNews.css");
}

export default class TopNews extends Component {
    constructor(props, context) {
        super(props, context)
        this.state = {
            autoplaySpeed: 4500,
            speed: 1500
        };
    }
    componentDidMount() {
        // this.handleResize()
        // window.addEventListener('resize', this.handleResize);
    }
    _onClick(e) {
        e.stopPropagation();
        // hack for stopping autoplay right away after clicking
        this.state.autoplaySpeed = 10000000;
        this.state.speed = 10000000;
        this.forceUpdate();
    }
    render() {
        const { topnews, device } = this.props
        let settings = {
            dots: true,
            infinite: true,
            speed: this.state.speed,
            autoplay: true,
            autoplaySpeed: this.state.autoplaySpeed,
            arrows: true,
            slidesToShow: 1,
            slidesToScroll: 1,
            lazyLoad: false,
            useCSS: true
        };
{'fraction_non_alphanumeric': 0.1132295719844358, 'fraction_numerical': 0.021011673151750974, 'mean_word_length': 1.9450171821305842, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 4, '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': '4594062', 'n_tokens_mistral': 776, 'n_tokens_neox': 737, 'n_words': 171}