import React, { PropTypes } from 'react' import ProfileImage from 'boost/components/ProfileImage' import ModeIcon from 'boost/components/ModeIcon' import moment from 'moment' import { switchArticle, NEW } from 'boost/actions' import FolderMark from 'boost/components/FolderMark' export default class ArticleList extends React.Component { handleArticleClick (key) { let { dispatch } = this.props return function (e) { dispatch(switchArticle(key)) } } render () { let { articles, activeArticle } = this.props console.log(articles) let articlesEl = articles.map(article => { let tags = Array.isArray(article.Tags) && article.Tags.length > 0 ? article.Tags.map(tag => { return ({tag.name}) }) : (Not tagged yet) return (