20 lines
495 B
JavaScript
20 lines
495 B
JavaScript
import { connect } from 'react-redux';
|
|
|
|
import { getItemBidCount, getItemPrice } from '../../selectors/auctions.js';
|
|
|
|
import AuctionPriceAndBidCount from '../../components/Auction/AuctionPriceAndBidCount.js';
|
|
|
|
function mapStateToProps(state, ownProps) {
|
|
const { itemId } = ownProps;
|
|
|
|
return {
|
|
bidCount: getItemBidCount(state, itemId),
|
|
currentPrice: getItemPrice(state, itemId),
|
|
};
|
|
}
|
|
|
|
export default connect(
|
|
mapStateToProps,
|
|
null,
|
|
)(AuctionPriceAndBidCount);
|