<commit_before>import { Link } from 'react-router'
import React, { Component } from 'react'
import { INTERACTIVE_ARTICLE_STYLE } from '../constants/index'
import { date2yyyymmdd } from '../lib/date-transformer'
import { getImageSrc } from '../utils/index'

// lodash
import get from 'lodash/get'
import map from 'lodash/map'

if (process.env.BROWSER) {
  require('./Daily.css')
}

export default class Daily extends Component {
  constructor(props, context) {
    super(props, context)
  }

  render() {
    const { daily } = this.props
    let dailyTop = []
    if ( daily ) { dailyTop = daily.slice(0, 6) }
    return dailyTop ? (
      <div className="daily">
        <div className="daily-news">
          <div className="what">觀&nbsp;點</div>
        </div>
        <div className="daily-itemlistwrapprt">
          <ul className="daily-itemlist">
          { map(dailyTop, (a, idx) => {
            const pubDate = date2yyyymmdd(a.publishedDate, '.')
            let thumbnail = getImageSrc(a, 'mobile')
            let url = '/a/' + a.slug
            return (
              <li className="daily-item" key={a.id || idx}>
                <Link to={url} target={get(a, 'style') === INTERACTIVE_ARTICLE_STYLE ? '_self' : undefined}>
                  <div className="daily-image">
                    <div style={{
                      backgroundImage: 'url(' + thumbnail + ')'
                    }} />
                  </div>
                  <div className="daily_lastpublish">{pubDate}</div>
                  {a.title}
                </Link>
              </li>
            )
          })}
          </ul>
        </div>
      </div>
    ) : null
  }
}

export { Daily }
<commit_msg>[Update] Update src/components/Daily.js<commit_after>import { Link } from 'react-router'
import React, { Component } from 'react'
import { INTERACTIVE_ARTICLE_STYLE } from '../constants/index'
import { date2yyyymmdd } from '../lib/date-transformer'
import { getArticleImageSrc } from '../utils/index'

// lodash
import get from 'lodash/get'
import map from 'lodash/map'

if (process.env.BROWSER) {
  require('./Daily.css')
}

export default class Daily extends Component {
  constructor(props, context) {
    super(props, context)
  }

  render() {
    const { daily } = this.props
    let dailyTop = []
    if ( daily ) { dailyTop = daily.slice(0, 6) }
    return dailyTop ? (
      <div className="daily">
        <div className="daily-news">
          <div className="what">觀&nbsp;點</div>
        </div>
        <div className="daily-itemlistwrapprt">
          <ul className="daily-itemlist">
          { map(dailyTop, (a, idx) => {
            const pubDate = date2yyyymmdd(a.publishedDate, '.')
            let thumbnail = getArticleImageSrc(a, 'mobile')
            let url = '/a/' + a.slug
            return (
              <li className="daily-item" key={a.id || idx}>
                <Link to={url} target={get(a, 'style') === INTERACTIVE_ARTICLE_STYLE ? '_self' : undefined}>
                  <div className="daily-image">
                    <div style={{
                      backgroundImage: 'url(' + thumbnail + ')'
                    }} />
                  </div>
                  <div className="daily_lastpublish">{pubDate}</div>
                  {a.title}
                </Link>
              </li>
            )
          })}
          </ul>
        </div>
      </div>
    ) : null
  }
}

export { Daily }

{'fraction_non_alphanumeric': 0.14839650145772595, 'fraction_numerical': 0.0023323615160349854, 'mean_word_length': 1.8402317880794703, 'pattern_counts': {'":': 0, '<': 41, '<?xml version=': 0, '>': 43, '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': '5489462', 'n_tokens_mistral': 1076, 'n_tokens_neox': 1029, 'n_words': 226}