-More!
This commit is contained in:
29
app/containers/Auction/AuctionListItem.js
Normal file
29
app/containers/Auction/AuctionListItem.js
Normal file
@@ -0,0 +1,29 @@
|
||||
import { connect } from 'react-redux';
|
||||
|
||||
import { placeBid } from '../../actions/auction.js';
|
||||
|
||||
import AuctionListItem from '../../components/Auction/AuctionListItem.js';
|
||||
|
||||
const mapStateToProps = (state, ownProps) => {
|
||||
const { item } = ownProps;
|
||||
|
||||
return {
|
||||
description: item.get('description'),
|
||||
donor: item.get('donor'),
|
||||
end: item.get('end'),
|
||||
id: item.get('id'),
|
||||
images: item.get('images').toArray(),
|
||||
start: item.get('start'),
|
||||
startingPrice: item.get('startingPrice'),
|
||||
subtitle: item.get('subtitle'),
|
||||
title: item.get('title'),
|
||||
type: item.get('type'),
|
||||
};
|
||||
};
|
||||
|
||||
const mapDispatchToProps = (dispatch) => ({
|
||||
placeBid: (data) => dispatch(placeBid(data)),
|
||||
});
|
||||
|
||||
export default connect(mapStateToProps, null)(AuctionListItem);
|
||||
|
||||
Reference in New Issue
Block a user