Advertisement
Guest User

Untitled

a guest
Oct 23rd, 2019
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. // src/screens/home/containers/Search.js
  2. import React from 'react';
  3. import { connect } from 'react-redux'
  4. import Form from 'react-bootstrap/Form'
  5.  
  6. const Search = ({query}) => {
  7. const handleOnSubmit = (e) => {
  8. e.preventDefault();
  9. }
  10. return (
  11. <div className="search-books">
  12. <Form className="search-books--form" onSubmit={handleOnSubmit}>
  13. <Form.Group>
  14. <Form.Control type="text" placeholder="Harry Potter, Food and Love" value={query} />
  15. <Form.Text className="text-muted">
  16. Search the world's most comprehensive index of full-text books.
  17. </Form.Text>
  18. </Form.Group>
  19. </Form>
  20. </div>
  21. )
  22. }
  23.  
  24. const mapStateToProps = state => {
  25. return {
  26. query: state.books.query
  27. }
  28. }
  29.  
  30. export default connect(
  31. mapStateToProps,
  32. null
  33. )(Search);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement