diff options
Diffstat (limited to 'src/client/react/components/container')
-rw-r--r-- | src/client/react/components/container/HelpBox.js | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/client/react/components/container/HelpBox.js b/src/client/react/components/container/HelpBox.js new file mode 100644 index 0000000..b4556a5 --- /dev/null +++ b/src/client/react/components/container/HelpBox.js @@ -0,0 +1,25 @@ +import React from 'react'; +import PropTypes from 'prop-types'; +import { connect } from 'react-redux'; + +const HelpBox = ({ results }) => { + if (results.length > 0) { + return <div />; + } + + return ( + <div className="help-box"> + Voer hier een docentafkorting, klas, leerlingnummer of lokaalnummer in. + </div> + ); +}; + +HelpBox.propTypes = { + results: PropTypes.arrayOf(PropTypes.string).isRequired, +}; + +const mapStateToProps = state => ({ + results: state.search.results, +}); + +export default connect(mapStateToProps)(HelpBox); |