// @flow import * as React from 'react'; import Button from 'component/button'; import CreditAmount from 'component/common/credit-amount'; import I18nMessage from 'component/i18nMessage'; type Props = { unclaimedRewardAmount: number, fetching: boolean, }; class RewardSummary extends React.Component { render() { const { unclaimedRewardAmount, fetching } = this.props; const hasRewards = unclaimedRewardAmount > 0; return (

{__('Rewards')}

{fetching && __('You have...')} {!fetching && hasRewards ? ( , }} > You have %credit_amount% in unclaimed rewards. ) : ( __('You have no rewards available.') )}

); } } export default RewardSummary;