From 2cac093369ecb965ddbef60e6dc2aa6e50f0e937 Mon Sep 17 00:00:00 2001
From: Noah Loomans <noahloomans@gmail.com>
Date: Mon, 11 Dec 2017 20:36:51 +0100
Subject: Refactor Results out of Search

---
 src/client/react/components/container/Results.jsx | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
 create mode 100644 src/client/react/components/container/Results.jsx

(limited to 'src/client/react/components/container/Results.jsx')

diff --git a/src/client/react/components/container/Results.jsx b/src/client/react/components/container/Results.jsx
new file mode 100644
index 0000000..04d1f84
--- /dev/null
+++ b/src/client/react/components/container/Results.jsx
@@ -0,0 +1,15 @@
+import React from 'react';
+import { connect } from 'react-redux';
+import Result from '../presentational/Result';
+
+const Results = (({ results }) => (
+  results.map(user => (
+    <Result key={user.value} user={user} />
+  ))
+));
+
+const mapStateToProps = state => ({
+  results: state.search.results,
+});
+
+export default connect(mapStateToProps)(Results);
-- 
cgit v1.1

