@@ -98,7 +98,7 @@ class HomePage extends React.Component {
9898 }
9999
100100 render ( ) {
101- let { dispatch, status, articles, activeArticle, folders, filters } = this . props
101+ let { dispatch, status, articles, allArticles , activeArticle, folders, filters } = this . props
102102
103103 return (
104104 < div className = 'HomePage' >
@@ -107,6 +107,7 @@ class HomePage extends React.Component {
107107 dispatch = { dispatch }
108108 folders = { folders }
109109 status = { status }
110+ allArticles = { allArticles }
110111 />
111112 < ArticleTopBar
112113 ref = 'top'
@@ -141,6 +142,7 @@ function remap (state) {
141142 articles . sort ( ( a , b ) => {
142143 return new Date ( b . updatedAt ) - new Date ( a . updatedAt )
143144 } )
145+ let allArticles = articles . slice ( )
144146
145147 // Filter articles
146148 let filters = status . search . split ( ' ' ) . map ( key => key . trim ( ) ) . filter ( key => key . length > 0 && ! key . match ( / ^ \/ $ / ) && ! key . match ( / ^ # $ / ) ) . map ( key => {
@@ -229,6 +231,7 @@ function remap (state) {
229231 return {
230232 folders,
231233 status,
234+ allArticles,
232235 articles,
233236 activeArticle,
234237 filters : {
@@ -247,6 +250,7 @@ HomePage.propTypes = {
247250 userId : PropTypes . string
248251 } ) ,
249252 articles : PropTypes . array ,
253+ allArticles : PropTypes . array ,
250254 activeArticle : PropTypes . shape ( ) ,
251255 dispatch : PropTypes . func ,
252256 folders : PropTypes . array ,
0 commit comments