-More!
This commit is contained in:
23
app/screens/Auction.container.js
Normal file
23
app/screens/Auction.container.js
Normal file
@@ -0,0 +1,23 @@
|
||||
import { connect } from 'react-redux';
|
||||
|
||||
import { fetchItems } from '../actions/items.js';
|
||||
import { fetchAuctionStatus } from '../actions/auctionStatus.js';
|
||||
|
||||
import { getAuctionItemsAsList } from '../selectors/items.js';
|
||||
|
||||
import Auction from './Auction.js';
|
||||
|
||||
const matchStateToProps = (state) => {
|
||||
const items = getAuctionItemsAsList(state);
|
||||
console.log('items:', items);
|
||||
|
||||
return { items };
|
||||
};
|
||||
|
||||
const mapDispatchToProps = (dispatch) => ({
|
||||
changeViewMode: (mode) => dispatch(changeViewMode(mode)),
|
||||
fetchItems: () => dispatch(fetchItems(dispatch)),
|
||||
fetchStatus: () => dispatch(fetchAuctionStatus(dispatch)),
|
||||
});
|
||||
|
||||
export default connect(matchStateToProps, mapDispatchToProps)(Auction);
|
||||
Reference in New Issue
Block a user