<commit_before>import React from "react";
import {Alert} from "bitshares-ui-style-guide";

export default class GitNews extends React.Component {
    constructor() {
        super();
        this.state = {
            news: {}
        };
    }

    componentDidMount() {
        this.getNews.call(this);
    }

    getNews() {
        fetch(
            "https://api.github.com/repos/blockchainprojects/bitshares-ui/contents/news.json?ref=news_feed_on_the_very_top"
        )
            .then(res => {
                return res.json();
            })
            .then(
                function(json) {
                    let news = JSON.parse(atob(json.content));
                    this.setState({news});
                }.bind(this)
            );
    }

    render() {
        const {news} = this.state;
        const renderAlert = Object.keys(news).length
            ? Object.values(news).map((item, index) => {
                  let now = new Date();
                  now.setHours(0, 0, 0, 0);
                  now = now.getTime();
                  const type = item.type === "critical" ? "error" : item.type;
                  const begin = new Date(
                      item.begin_date.split(".").reverse()
                  ).getTime();
                  const end = new Date(
                      item.end_date.split(".").reverse()
                  ).getTime();
                  if (now >= begin && now <= end)
                      return (
                          <Alert
                              key={index}
                              type={type}
                              message={item.content}
                              banner
                              closable={type === "info"}
                          />
                      );
              })
            : null;
        return renderAlert;
    }
}
<commit_msg>remove time<commit_after>import React from "react";
import {Alert} from "bitshares-ui-style-guide";

export default class GitNews extends React.Component {
    constructor() {
        super();
        this.state = {
            news: {}
        };
    }

    componentDidMount() {
        this.getNews.call(this);
    }

    getNews() {
        fetch(
            "https://api.github.com/repos/blockchainprojects/bitshares-ui/contents/news.json?ref=news_feed_on_the_very_top"
        )
            .then(res => {
                return res.json();
            })
            .then(
                function(json) {
                    let news = JSON.parse(atob(json.content));
                    this.setState({news});
                }.bind(this)
            );
    }

    render() {
        const {news} = this.state;
        const renderAlert = Object.keys(news).length
            ? Object.values(news).map((item, index) => {
                  let now = new Date();
                  const type = item.type === "critical" ? "error" : item.type;
                  const begin = new Date(item.begin_date.split(".").reverse());
                  const end = new Date(item.end_date.split(".").reverse());
                  if (now >= begin && now <= end)
                      return (
                          <Alert
                              key={index}
                              type={type}
                              message={item.content}
                              banner
                              closable={type === "info"}
                          />
                      );
              })
            : null;
        return renderAlert;
    }
}

{'fraction_non_alphanumeric': 0.12179306456160136, 'fraction_numerical': 0.001127713560755568, 'mean_word_length': 1.0426021876799079, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 11, 'https://': 2, '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': '6518815', 'n_tokens_mistral': 922, 'n_tokens_neox': 872, 'n_words': 163}