- Linting... Prettier...
This commit is contained in:
@@ -5,25 +5,27 @@ import { placeBid } from '../../actions/auction.js';
|
||||
import AuctionListItem from '../../components/Auction/AuctionListItem.js';
|
||||
|
||||
const mapStateToProps = (state, ownProps) => {
|
||||
const { item } = 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'),
|
||||
};
|
||||
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)),
|
||||
placeBid: (data) => dispatch(placeBid(data)),
|
||||
});
|
||||
|
||||
export default connect(mapStateToProps, null)(AuctionListItem);
|
||||
|
||||
export default connect(
|
||||
mapStateToProps,
|
||||
null,
|
||||
)(AuctionListItem);
|
||||
|
||||
@@ -5,12 +5,15 @@ import { getItemBidCount, getItemPrice } from '../../selectors/auctions.js';
|
||||
import AuctionPriceAndBidCount from '../../components/Auction/AuctionPriceAndBidCount.js';
|
||||
|
||||
function mapStateToProps(state, ownProps) {
|
||||
const { itemId } = ownProps;
|
||||
const { itemId } = ownProps;
|
||||
|
||||
return {
|
||||
bidCount: getItemBidCount(state, itemId),
|
||||
currentPrice: getItemPrice(state, itemId),
|
||||
};
|
||||
return {
|
||||
bidCount: getItemBidCount(state, itemId),
|
||||
currentPrice: getItemPrice(state, itemId),
|
||||
};
|
||||
}
|
||||
|
||||
export default connect(mapStateToProps, null)(AuctionPriceAndBidCount);
|
||||
export default connect(
|
||||
mapStateToProps,
|
||||
null,
|
||||
)(AuctionPriceAndBidCount);
|
||||
|
||||
@@ -5,12 +5,15 @@ import { isBiddingItem, isWinningItem } from '../../selectors/auctions.js';
|
||||
import AuctionPriceAndBidCount from '../../components/Auction/BidStatus.js';
|
||||
|
||||
function mapStateToProps(state, ownProps) {
|
||||
const { itemId } = ownProps;
|
||||
const { itemId } = ownProps;
|
||||
|
||||
return {
|
||||
isBidding: isBiddingItem(state, itemId),
|
||||
isWinning: isWinningItem(state, itemId),
|
||||
};
|
||||
return {
|
||||
isBidding: isBiddingItem(state, itemId),
|
||||
isWinning: isWinningItem(state, itemId),
|
||||
};
|
||||
}
|
||||
|
||||
export default connect(mapStateToProps, null)(AuctionPriceAndBidCount);
|
||||
export default connect(
|
||||
mapStateToProps,
|
||||
null,
|
||||
)(AuctionPriceAndBidCount);
|
||||
|
||||
@@ -6,14 +6,17 @@ import { getEventsAsList } from '../selectors/events.js';
|
||||
import Events from '../screens/Events.js';
|
||||
|
||||
const matchStateToProps = (state) => {
|
||||
const events = getEventsAsList(state);
|
||||
console.log('events:', events);
|
||||
const events = getEventsAsList(state);
|
||||
console.log('events:', events);
|
||||
|
||||
return { events };
|
||||
return { events };
|
||||
};
|
||||
|
||||
const mapDispatchToProps = (dispatch) => ({
|
||||
fetchEvents: () => dispatch(fetchEvents(dispatch)),
|
||||
fetchEvents: () => dispatch(fetchEvents(dispatch)),
|
||||
});
|
||||
|
||||
export default connect(matchStateToProps, mapDispatchToProps)(Events);
|
||||
export default connect(
|
||||
matchStateToProps,
|
||||
mapDispatchToProps,
|
||||
)(Events);
|
||||
|
||||
@@ -4,26 +4,28 @@ import { setActiveEvent } from '../../actions/events.js';
|
||||
import EventListItem from '../../components/Events/EventListItem.js';
|
||||
|
||||
const mapStateToProps = (state, ownProps) => {
|
||||
const { event } = ownProps;
|
||||
const { event } = ownProps;
|
||||
|
||||
return {
|
||||
description: event.get('description'),
|
||||
endTime: event.get('endTime'),
|
||||
id: event.get('id'),
|
||||
images: event.get('images').toArray(),
|
||||
isTicketed: event.get('isTicketed'),
|
||||
postCount: event.get('posts').size,
|
||||
showFrom: event.get('showFrom'),
|
||||
showUntil: event.get('showUntil'),
|
||||
startTime: event.get('startTime'),
|
||||
tagline: event.get('tagline'),
|
||||
title: event.get('title'),
|
||||
};
|
||||
return {
|
||||
description: event.get('description'),
|
||||
endTime: event.get('endTime'),
|
||||
id: event.get('id'),
|
||||
images: event.get('images').toArray(),
|
||||
isTicketed: event.get('isTicketed'),
|
||||
postCount: event.get('posts').size,
|
||||
showFrom: event.get('showFrom'),
|
||||
showUntil: event.get('showUntil'),
|
||||
startTime: event.get('startTime'),
|
||||
tagline: event.get('tagline'),
|
||||
title: event.get('title'),
|
||||
};
|
||||
};
|
||||
|
||||
const mapDispatchToProps = (dispatch) => ({
|
||||
setActiveEvent: (eventId) => dispatch(setActiveEvent(eventId)),
|
||||
setActiveEvent: (eventId) => dispatch(setActiveEvent(eventId)),
|
||||
});
|
||||
|
||||
export default connect(mapStateToProps, null)(AuctionListItem);
|
||||
|
||||
export default connect(
|
||||
mapStateToProps,
|
||||
null,
|
||||
)(AuctionListItem);
|
||||
|
||||
Reference in New Issue
Block a user