goodsListSearch.js 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. // import {OneGood} from "./index";
  2. // import {createStore, combineReducers, applyMiddleware, bindActionCreators} from 'redux';
  3. // import {getData, actionGoods, actionWishDelete, actionWishAdd, getSearchedGoods, actionSearch} from "../reducers";
  4. // import {Provider, connect} from 'react-redux';
  5. // import {GoodsNotFound } from "./index";
  6. // const mapStateToProps = state => ({
  7. // state: state,
  8. // search: getData(state, "search"),
  9. // status: state.promiseRed && state.promiseRed.search &&
  10. // state.promiseRed.search.payload && state.promiseRed.search &&
  11. // state.promiseRed.search.status,
  12. // wishes: state.wishListReducer
  13. // });
  14. // const mapDispatchToProps = dispatch => bindActionCreators({
  15. // getData: actionSearch,
  16. // addWish: actionWishAdd,
  17. // delWish: actionWishDelete,
  18. // }, dispatch);
  19. // const GoodsListSearch = ({status, wishes,addWish, delWish, search = [], className = "goods"}) => {
  20. // if(search.length == 0) {
  21. // return(
  22. // <>
  23. // <GoodsNotFound/>
  24. // </>
  25. // )
  26. // }
  27. // return (
  28. // <div className = {className}>
  29. // {search.map((good) => <OneGood key = {good._id} name = {good.name} price = {good.price} image = {good.images ? `http://shop-roles.asmer.fs.a-level.com.ua/${good.images[0].url}` : `https://images.ua.prom.st/2259265311_korobka-syurpriz-dlya.jpg`}/>)}
  30. // </div>
  31. // )
  32. // }
  33. // const CGoodsListSearch = connect(mapStateToProps, mapDispatchToProps)(GoodsListSearch);
  34. // export default CGoodsListSearch;