<commit_before>"use strict";

import React, { Component, PropTypes } from "react";
import DateTimeUtil from "../../utils/DateTimeUtil.js";

export default class FeedHeader extends Component {
    render() {
        let localDateTime = DateTimeUtil.getLocalTimeFromUTC(this.props.postedDate);
        let tags = this.props.tags ? this.props.tags.map((tag, index)=> <li className="tag" key={index}>{tag}</li>) : null;
        let actionElement = this.props.actionComponent ? React.createElement(this.props.actionComponent, this.props) : null;
        return (
            <div className="feed-header border-bottom box h-center clear-fix">
                <span className="icon-container header-item"><i className={"feed-icon fa fa-" + this.props.feedType.toLowerCase()}></i></span>
                <span className="category-name header-item">{this.props.categoryNames}</span>
                <ul className="h-center header-item">
                    <li className="tag">{localDateTime} </li>
                    {tags}
                </ul>
                {actionElement}
            </div>
        );
    }
}

FeedHeader.displayName = "FeedHeader";

FeedHeader.propTypes = {
    "actionComponent": PropTypes.func,
    "feedType": PropTypes.string,
    "categoryNames": PropTypes.string,
    "tags": PropTypes.array,
    "postedDate": PropTypes.string
};
<commit_msg>[anil/katta] handled null in posted date<commit_after>"use strict";

import React, { Component, PropTypes } from "react";
import DateTimeUtil from "../../utils/DateTimeUtil.js";

export default class FeedHeader extends Component {
    render() {
        let localDateTime = this.props.postedDate ? DateTimeUtil.getLocalTimeFromUTC(this.props.postedDate) : null;
        let tags = this.props.tags === "" ? this.props.tags.map((tag, index)=> <li className="tag" key={index}>{tag}</li>) : null;
        let actionElement = this.props.actionComponent ? React.createElement(this.props.actionComponent, this.props) : null;
        return (
            <div className="feed-header border-bottom box h-center clear-fix">
                <span className="icon-container header-item"><i className={"feed-icon fa fa-" + this.props.feedType.toLowerCase()}></i></span>
                <span className="category-name header-item">{this.props.categoryNames}</span>
                <ul className="h-center header-item">
                    <li className="tag">{localDateTime} </li>
                    {tags}
                </ul>
                {actionElement}
            </div>
        );
    }
}

FeedHeader.displayName = "FeedHeader";

FeedHeader.propTypes = {
    "actionComponent": PropTypes.func,
    "feedType": PropTypes.string,
    "categoryNames": PropTypes.string,
    "tags": PropTypes.array,
    "postedDate": PropTypes.string
};

{'fraction_non_alphanumeric': 0.14301036825169824, 'fraction_numerical': 0.0, 'mean_word_length': 2.745649263721553, 'pattern_counts': {'":': 10, '<': 31, '<?xml version=': 0, '>': 33, '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': '967514', 'n_tokens_mistral': 771, 'n_tokens_neox': 766, 'n_words': 161}