12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- // import {OneGood} from "./index";
- // import {createStore, combineReducers, applyMiddleware, bindActionCreators} from 'redux';
- // import {getData, actionGoods, actionWishDelete, actionWishAdd, getSearchedGoods, actionSearch} from "../reducers";
- // import {Provider, connect} from 'react-redux';
- // import {GoodsNotFound } from "./index";
- // const mapStateToProps = state => ({
- // state: state,
- // search: getData(state, "search"),
- // status: state.promiseRed && state.promiseRed.search &&
- // state.promiseRed.search.payload && state.promiseRed.search &&
- // state.promiseRed.search.status,
- // wishes: state.wishListReducer
-
- // });
-
- // const mapDispatchToProps = dispatch => bindActionCreators({
- // getData: actionSearch,
- // addWish: actionWishAdd,
- // delWish: actionWishDelete,
-
- // }, dispatch);
-
- // const GoodsListSearch = ({status, wishes,addWish, delWish, search = [], className = "goods"}) => {
-
- // if(search.length == 0) {
- // return(
- // <>
- // <GoodsNotFound/>
- // </>
- // )
- // }
- // return (
- // <div className = {className}>
- // {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`}/>)}
- // </div>
- // )
- // }
- // const CGoodsListSearch = connect(mapStateToProps, mapDispatchToProps)(GoodsListSearch);
- // export default CGoodsListSearch;
|