From afdba5fd5d1b689bfd52204eb542d73f38feea79 Mon Sep 17 00:00:00 2001 From: jessop Date: Thu, 12 Sep 2019 20:57:10 -0400 Subject: [PATCH] user youtubeChannels selector --- dist/bundle.es.js | 2 ++ dist/bundle.js | 6 ++++++ src/index.js | 1 + src/redux/selectors/user.js | 5 +++++ 4 files changed, 14 insertions(+) diff --git a/dist/bundle.es.js b/dist/bundle.es.js index 075a456..cbb7a4f 100644 --- a/dist/bundle.es.js +++ b/dist/bundle.es.js @@ -972,6 +972,7 @@ const selectUserPhone = reselect.createSelector(selectUser, user => user ? user. const selectUserCountryCode = reselect.createSelector(selectUser, user => user ? user.country_code : null); const selectEmailToVerify = reselect.createSelector(selectState$2, selectUserEmail, (state, userEmail) => state.emailToVerify || userEmail); const selectPhoneToVerify = reselect.createSelector(selectState$2, selectUserPhone, (state, userPhone) => state.phoneToVerify || userPhone); +const selectYoutubeChannels = reselect.createSelector(selectUser, user => user ? user.youtube_channels : null); const selectUserIsRewardApproved = reselect.createSelector(selectUser, user => user && user.is_reward_approved); const selectEmailNewIsPending = reselect.createSelector(selectState$2, state => state.emailNewIsPending); const selectEmailNewErrorMessage = reselect.createSelector(selectState$2, state => state.emailNewErrorMessage); @@ -3046,6 +3047,7 @@ exports.selectUserIsVerificationCandidate = selectUserIsVerificationCandidate; exports.selectUserPhone = selectUserPhone; exports.selectUserVerifiedEmail = selectUserVerifiedEmail; exports.selectViewMode = selectViewMode; +exports.selectYoutubeChannels = selectYoutubeChannels; exports.setSubscriptionLatest = setSubscriptionLatest; exports.statsReducer = statsReducer; exports.subscriptionsReducer = subscriptions; diff --git a/dist/bundle.js b/dist/bundle.js index 1929acd..a2e2c61 100644 --- a/dist/bundle.js +++ b/dist/bundle.js @@ -381,6 +381,8 @@ __webpack_require__.r(__webpack_exports__); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectUserVerifiedEmail", function() { return redux_selectors_user__WEBPACK_IMPORTED_MODULE_27__["selectUserVerifiedEmail"]; }); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selectYoutubeChannels", function() { return redux_selectors_user__WEBPACK_IMPORTED_MODULE_27__["selectYoutubeChannels"]; }); + /* harmony import */ var redux_selectors_cost_info__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(38); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "makeSelectFetchingCostInfoForUri", function() { return redux_selectors_cost_info__WEBPACK_IMPORTED_MODULE_28__["makeSelectFetchingCostInfoForUri"]; }); @@ -2261,6 +2263,7 @@ __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "selectUserCountryCode", function() { return selectUserCountryCode; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "selectEmailToVerify", function() { return selectEmailToVerify; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "selectPhoneToVerify", function() { return selectPhoneToVerify; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "selectYoutubeChannels", function() { return selectYoutubeChannels; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "selectUserIsRewardApproved", function() { return selectUserIsRewardApproved; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "selectEmailNewIsPending", function() { return selectEmailNewIsPending; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "selectEmailNewErrorMessage", function() { return selectEmailNewErrorMessage; }); @@ -2312,6 +2315,9 @@ var selectEmailToVerify = Object(reselect__WEBPACK_IMPORTED_MODULE_0__["createSe var selectPhoneToVerify = Object(reselect__WEBPACK_IMPORTED_MODULE_0__["createSelector"])(selectState, selectUserPhone, function (state, userPhone) { return state.phoneToVerify || userPhone; }); +var selectYoutubeChannels = Object(reselect__WEBPACK_IMPORTED_MODULE_0__["createSelector"])(selectUser, function (user) { + return user ? user.youtube_channels : null; +}); var selectUserIsRewardApproved = Object(reselect__WEBPACK_IMPORTED_MODULE_0__["createSelector"])(selectUser, function (user) { return user && user.is_reward_approved; }); diff --git a/src/index.js b/src/index.js index 5d68853..c4f83fb 100644 --- a/src/index.js +++ b/src/index.js @@ -151,6 +151,7 @@ export { selectUserInviteNewErrorMessage, selectUserInviteReferralLink, selectUserVerifiedEmail, + selectYoutubeChannels, } from 'redux/selectors/user'; export { makeSelectFetchingCostInfoForUri, diff --git a/src/redux/selectors/user.js b/src/redux/selectors/user.js index 56f16e0..a36d011 100644 --- a/src/redux/selectors/user.js +++ b/src/redux/selectors/user.js @@ -38,6 +38,11 @@ export const selectPhoneToVerify = createSelector( (state, userPhone) => state.phoneToVerify || userPhone ); +export const selectYoutubeChannels = createSelector( + selectUser, + user => (user ? user.youtube_channels : null) +); + export const selectUserIsRewardApproved = createSelector( selectUser, user => user && user.is_reward_approved