aboutsummaryrefslogtreecommitdiff
path: root/src/client/react/components/container/Search.jsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/react/components/container/Search.jsx')
-rw-r--r--src/client/react/components/container/Search.jsx10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/client/react/components/container/Search.jsx b/src/client/react/components/container/Search.jsx
index 50917dd..babe0c4 100644
--- a/src/client/react/components/container/Search.jsx
+++ b/src/client/react/components/container/Search.jsx
@@ -7,14 +7,10 @@ import SearchIcon from 'react-icons/lib/md/search';
import { inputChange, changeSelectedResult } from '../../actions/search';
+import users from '../../users';
import Results from './Results';
import IconFromUserType from '../presentational/IconFromUserType';
-const userShape = {
- value: PropTypes.string.isRequired,
- type: PropTypes.string.isRequired,
-};
-
class Search extends React.Component {
constructor(props) {
super(props);
@@ -73,7 +69,7 @@ class Search extends React.Component {
<div className="search__input-wrapper">
<div className="search__icon-wrapper">
<IconFromUserType
- userType={isExactMatch ? selectedResult.type : null}
+ userType={isExactMatch ? users.byId[selectedResult].type : null}
defaultIcon={<SearchIcon />}
/>
</div>
@@ -95,7 +91,7 @@ class Search extends React.Component {
Search.propTypes = {
value: PropTypes.string.isRequired,
- selectedResult: PropTypes.shape(userShape),
+ selectedResult: PropTypes.string,
isExactMatch: PropTypes.bool.isRequired,
dispatch: PropTypes.func.isRequired,
};