diff --git a/browser/main/HomePage.js b/browser/main/HomePage.js index 6273e0dd..0cca9d94 100644 --- a/browser/main/HomePage.js +++ b/browser/main/HomePage.js @@ -69,6 +69,9 @@ function remap (state) { let articles = state.articles['team-' + activeUser.id] if (articles == null) articles = [] + articles.sort((a, b) => { + return new Date(b.updatedAt) - new Date(a.updatedAt) + }) let activeArticle = findWhere(articles, {key: status.articleKey}) if (activeArticle == null) activeArticle = articles[0] diff --git a/browser/main/HomePage/ArticleDetail.js b/browser/main/HomePage/ArticleDetail.js index 768a3aa9..1ad8dc4f 100644 --- a/browser/main/HomePage/ArticleDetail.js +++ b/browser/main/HomePage/ArticleDetail.js @@ -9,6 +9,7 @@ import aceModes from 'boost/ace-modes' import Select from 'react-select' import linkState from 'boost/linkState' import api from 'boost/api' +import FolderMark from 'boost/components/FolderMark' var modeOptions = aceModes.map(function (mode) { return { @@ -19,7 +20,7 @@ var modeOptions = aceModes.map(function (mode) { function makeInstantArticle (article) { let instantArticle = Object.assign({}, article) - instantArticle.Tags = typeof instantArticle.Tags === 'array' ? instantArticle.Tags.map(tag => tag.name) : [] + instantArticle.Tags = (typeof instantArticle.Tags === 'array') ? instantArticle.Tags.map(tag => tag.name) : [] return instantArticle } @@ -115,7 +116,7 @@ export default class ArticleDetail extends React.Component {