From 88d02ebb718f7f28da21792e67b290c3a8b209d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A1ssio=20Zen?= Date: Fri, 2 Dec 2016 15:19:08 -0200 Subject: [PATCH] Missing Prop. Closes #182 --- src/containers/SearchPage.js | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/src/containers/SearchPage.js b/src/containers/SearchPage.js index 68f440dc..b4c6df1f 100644 --- a/src/containers/SearchPage.js +++ b/src/containers/SearchPage.js @@ -13,7 +13,10 @@ class SearchPage extends React.Component { isFetching: PropTypes.bool, searchEntries: PropTypes.func.isRequired, searchTerm: PropTypes.string.isRequired, + collections: ImmutablePropTypes.seq, entries: ImmutablePropTypes.list, + page: PropTypes.number, + publicFolder: PropTypes.string, }; componentDidMount() { @@ -33,13 +36,19 @@ class SearchPage extends React.Component { }; render() { - const { collections, searchTerm, entries, isFetching, page } = this.props; + const { collections, searchTerm, entries, isFetching, page, publicFolder } = this.props; return (
{(isFetching === true || !entries) ? {['Loading Entries', 'Caching Entries', 'This might take several minutes']} : - - Results for “ {searchTerm}” + + Results for “{searchTerm}” }
); @@ -52,9 +61,10 @@ function mapStateToProps(state, ownProps) { const page = state.entries.getIn(['search', 'page']); const entries = selectSearchedEntries(state); const collections = state.collections.toIndexedSeq(); + const publicFolder = state.config.get('public_folder'); const searchTerm = ownProps.params && ownProps.params.searchTerm; - return { isFetching, page, collections, entries, searchTerm }; + return { isFetching, page, collections, entries, publicFolder, searchTerm }; }