From 392ea8d0ba2fdc713ae156517b0575e8219b9f1c Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Wed, 13 Feb 2019 13:58:11 +0100 Subject: adding geocode client --- scraper/client/search/search.results.js | 49 +++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 scraper/client/search/search.results.js (limited to 'scraper/client/search/search.results.js') diff --git a/scraper/client/search/search.results.js b/scraper/client/search/search.results.js new file mode 100644 index 00000000..8b9e0c5e --- /dev/null +++ b/scraper/client/search/search.results.js @@ -0,0 +1,49 @@ +import React, { Component } from 'react' +import { Link, withRouter } from 'react-router-dom' +import { bindActionCreators } from 'redux' +import { connect } from 'react-redux' +import * as querystring from 'querystring' + +import { Keyframes } from '../common' +import * as searchActions from './search.actions' + +function SearchResults({ query, results, options }) { + if (!query || query.reset || query.loading || !results) { + return
+ } + if (!query.loading && !results.length) { + return

No results

+ } + return ( +
+
+
+

Search Results

+ + {'Searched 10,523,176 frames from 576,234 videos (took '}{query.timing.toFixed(2)}{' ms)'} + +
+
+ +
+ ) +} + +const mapStateToProps = state => ({ + query: state.search.query.query, + results: state.search.query.results, + options: state.search.options, +}) + +const mapDispatchToProps = dispatch => ({ + searchActions: bindActionCreators({ ...searchActions }, dispatch), +}) + +export default withRouter(connect(mapStateToProps, mapDispatchToProps)(SearchResults)) -- cgit v1.2.3-70-g09d2