diff --git a/ui/js/page/rewards/index.js b/ui/js/page/rewards/index.js index 61d0515e9..8e7abb1fc 100644 --- a/ui/js/page/rewards/index.js +++ b/ui/js/page/rewards/index.js @@ -7,6 +7,7 @@ import { selectUserHasEmail, selectUserIsVerificationCandidate, } from "selectors/user"; +import { doRewardList } from "actions/rewards"; import RewardsPage from "./view"; const select = state => ({ @@ -17,4 +18,8 @@ const select = state => ({ isVerificationCandidate: selectUserIsVerificationCandidate(state), }); -export default connect(select, null)(RewardsPage); +const perform = dispatch => ({ + fetchRewards: () => dispatch(doRewardList()), +}); + +export default connect(select, perform)(RewardsPage); diff --git a/ui/js/page/rewards/view.jsx b/ui/js/page/rewards/view.jsx index b7342210e..3b6964761 100644 --- a/ui/js/page/rewards/view.jsx +++ b/ui/js/page/rewards/view.jsx @@ -29,64 +29,80 @@ const RewardTile = props => { ); }; -const RewardsPage = props => { - const { - fetching, - isEligible, - isVerificationCandidate, - hasEmail, - rewards, - } = props; - - let content, - isCard = false; - - if (!hasEmail || isVerificationCandidate) { - content = ( -
- {__( - "Additional information is required to be eligible for the rewards program." - )} -
-{__("You are not eligible to claim rewards.")}
-- {__("To become eligible, email")} - {" "}{" "} - {__("with a link to a public social media profile.")} -
-+ {__( + "Additional information is required to be eligible for the rewards program." + )} +
+{__("You are not eligible to claim rewards.")}
++ {__("To become eligible, email")} + {" "}{" "} + {__("with a link to a public social media profile.")} +
+