- implementing immutable.js
This commit is contained in:
@@ -1,13 +1,15 @@
|
||||
import { connect } from 'react-redux';
|
||||
|
||||
import { getItemBidCount, getItemPrice } from '../../selectors/auctions.js';
|
||||
|
||||
import AuctionPriceAndBidCount from '../../components/Auction/AuctionPriceAndBidCount.js';
|
||||
|
||||
function mapStateToProps(state, ownProps) {
|
||||
const { bidCount, currentPrice } = getAuctionItemStatus(state, ownProps.id);
|
||||
const { itemId } = ownProps;
|
||||
|
||||
return {
|
||||
bidCount,
|
||||
currentPrice,
|
||||
bidCount: getItemBidCount(state, itemId),
|
||||
currentPrice: getItemPrice(state, itemId),
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user