From 9d3d1e98ee3f753d95eaa961584b63e9e937dcfd Mon Sep 17 00:00:00 2001 From: Mavis Ou Date: Thu, 14 Mar 2019 15:58:09 -0700 Subject: [PATCH] Related to #2811 - removed old file home-news.jsx --- source/js/components/home-news/home-news.jsx | 73 -------------------- 1 file changed, 73 deletions(-) delete mode 100644 source/js/components/home-news/home-news.jsx diff --git a/source/js/components/home-news/home-news.jsx b/source/js/components/home-news/home-news.jsx deleted file mode 100644 index 8fd48fa5772..00000000000 --- a/source/js/components/home-news/home-news.jsx +++ /dev/null @@ -1,73 +0,0 @@ -import React from "react"; -import PropTypes from "prop-types"; -import moment from "moment"; - -export default class HomeNews extends React.Component { - constructor(props) { - super(props); - - this.state = {}; - } - - render() { - let newsItem = (item, featured = false, index = null, hr = false) => { - return ( -
-
- {item.glyph && } -

{item.outlet}

-
-
- - {item.headline} - -
-

- {item.author && `by ${item.author} on `} - {moment(item.date, `YYYY-MM-DD`).format(`MMMM YYYY`)} -

- {item.excerpt &&

{item.excerpt}

} - {hr &&
} -
- ); - }; - - let unfeaturedNews = this.props.data.slice(1).map((item, index, array) => { - return newsItem(item, false, index, index < array.length - 1); - }); - - let featuredNews = this.props.data[0]; - - return ( -
-
-
- - {featuredNews.is_video && ( - - )} -
-
-
-
- {newsItem(featuredNews, true)} -
-
-
-
-
{unfeaturedNews}
-
- ); - } -} - -HomeNews.propTypes = { - data: PropTypes.array -}; - -HomeNews.defaultProps = { - data: [] -};