- implementing immutable.js
This commit is contained in:
1 parent
8ecf036cc4
commit
434a1ded24
39 files changed
+1123
-187
No files matched your search
@@ -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),
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -1,20 +1,15 @@
|
||||
import { connect } from 'react-redux';
|
||||
|
||||
import { isBiddingItem, isWinningItem } from '../../selectors/auctions.js';
|
||||
|
||||
import AuctionPriceAndBidCount from '../../components/Auction/BidStatus.js';
|
||||
|
||||
function mapStateToProps(state, ownProps) {
|
||||
const {
|
||||
bidCount,
|
||||
currentPrice,
|
||||
isBidding,
|
||||
isWinning,
|
||||
} = getAuctionItemStatus(state, ownProps.id);
|
||||
const { itemId } = ownProps;
|
||||
|
||||
return {
|
||||
bidCount,
|
||||
currentPrice,
|
||||
isBidding,
|
||||
isWinning,
|
||||
isBidding: isBiddingItem(state, itemId),
|
||||
isWinning: isWinningItem(state, itemId),
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user