- Cleanup

This commit is contained in:
2019-08-06 01:36:08 -04:00
parent 6e71ac688a
commit b8ddc54b99
43 changed files with 361 additions and 170 deletions

View File

@@ -8,6 +8,6 @@ export const getActiveEventId = createSelector(
);
export const hasActiveEvent = createSelector(
[getState],
(state) => !!state.get('activeEvent'),
[getActiveEventId],
(eventId) => !!eventId,
);

View File

@@ -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
View File

@@ -0,0 +1,8 @@
import { createSelector } from 'reselect';
const getState = (state) => state;
export const getAuthToken = createSelector(
[getState],
(state) => state.get('auth'),
);

View File

@@ -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(