import * as React from 'react'; import { connect } from 'react-redux'; import * as classnames from 'classnames'; import Result from '../presentational/Result'; import { User } from '../../users'; import { State } from '../../reducers'; const Results: React.StatelessComponent<{ results: string[], isExactMatch: boolean, selectedResult: string }> = (props) => (
0, })} > {!props.isExactMatch && props.results.map(userId => ( ))}
); const mapStateToProps = (state: State) => ({ results: state.search.results, isExactMatch: state.search.isExactMatch, selectedResult: state.search.selectedResult, }); export default connect(mapStateToProps)(Results);