- Cleanup
This commit is contained in:
@@ -8,6 +8,6 @@ export const getActiveEventId = createSelector(
|
||||
);
|
||||
|
||||
export const hasActiveEvent = createSelector(
|
||||
[getState],
|
||||
(state) => !!state.get('activeEvent'),
|
||||
[getActiveEventId],
|
||||
(eventId) => !!eventId,
|
||||
);
|
||||
|
||||
@@ -19,15 +19,15 @@ export const getAuctionStatuses = createSelector(
|
||||
|
||||
export const getItemsIdsWithNoBids = createSelector(
|
||||
[getAuctionStatuses],
|
||||
(auctions) => auctions.filter(auction => auction.bidCount === 0);
|
||||
(auctions) => auctions.filter(auction => auction.bidCount === 0),
|
||||
);
|
||||
|
||||
export const getMyBidItemIds = createSelector(
|
||||
[getAuctionStatuses],
|
||||
(auctions) => auctions.filter(auction => auction.isBidding);
|
||||
(auctions) => auctions.filter(auction => auction.isBidding),
|
||||
);
|
||||
|
||||
export const getMyWinningItemIds = createSelector(
|
||||
[getAuctionStatuses],
|
||||
(auctions) => auctions.filter(auction => auction.isWinning);
|
||||
(auctions) => auctions.filter(auction => auction.isWinning),
|
||||
);
|
||||
|
||||
8
app/selectors/auth.js
Normal file
8
app/selectors/auth.js
Normal file
@@ -0,0 +1,8 @@
|
||||
import { createSelector } from 'reselect';
|
||||
|
||||
const getState = (state) => state;
|
||||
|
||||
export const getAuthToken = createSelector(
|
||||
[getState],
|
||||
(state) => state.get('auth'),
|
||||
);
|
||||
@@ -14,7 +14,7 @@ export const getEvents = createSelector(
|
||||
|
||||
export const getActiveEvent = createSelector(
|
||||
[getActiveEventId, getEvents],
|
||||
(eventId, eventsAsMap) => eventId ? eventsAsMap.get(eventId) : false,
|
||||
(eventId, eventsAsMap) => eventId ? eventsAsMap.get(eventId) : null,
|
||||
);
|
||||
|
||||
export const getDefaultEvent = createSelector(
|
||||
|
||||
Reference in New Issue
Block a user