<commit_before>'use strict'

import React, { Component, PropTypes } from 'react'

export default class Warning extends Component {
    constructor(props) {
        super(props)
        this.state = {
            showDetails: false
        }

        this.showDetail = this.showDetail.bind(this)
    }


    showDetail() {
        const toggle = this.state.showDetails
        this.setState( {showDetails: !toggle})
    }

    generateTimeFragment(label, time) {
        if(!time) return null

        const date = new Date(time)
        // if the date is today just return the time part
        const now = new Date()

        function pad(n) {
            return (n < 10) ? ("0" + n) : n
        }


        let timeString = null<commit_msg>Show the correct time and date of warning along with clock face icon https://github.com/davidtron/uk-72-ui/issues/2<commit_after>'use strict'

import React, { Component, PropTypes } from 'react'

export default class Warning extends Component {
    constructor(props) {
        super(props)
        this.state = {
            showDetails: false
        }

        this.showDetail = this.showDetail.bind(this)
    }


    showDetail() {
        const toggle = this.state.showDetails
        this.setState( {showDetails: !toggle})
    }

    generateTimeFragment(label, time) {
        if(!time) return null

        const date = new Date(time)
        // if the date is today just return the time part
        const now = new Date()

        function pad(n) {
            return (n < 10) ? ("0" + n) : n
        }

        let timeString = null
{'fraction_non_alphanumeric': 0.09842271293375394, 'fraction_numerical': 0.0056782334384858045, 'mean_word_length': 2.0267175572519083, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 1, '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': '712451', 'n_tokens_mistral': 455, 'n_tokens_neox': 435, 'n_words': 136}