Skip to content

Commit

Permalink
Plans: use getSitePlan selector in UpgradeNudgeExpanded (Automattic#8054
Browse files Browse the repository at this point in the history
)
  • Loading branch information
rralian authored and artpi committed Sep 13, 2016
1 parent 0e8e3ac commit f4cff3e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions client/blocks/upgrade-nudge-expanded/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import { preventWidows } from 'lib/formatting';
import { getFeatureTitle } from 'lib/plans';
import { getPlanBySlug } from 'state/plans/selectors';
import { PLAN_PERSONAL, getPlanClass, plansList } from 'lib/plans/constants';
import { getCurrentPlan } from 'state/sites/plans/selectors';
import { getSitePlan } from 'state/sites/selectors';
import { getSelectedSiteId } from 'state/ui/selectors';
import { getSiteSlug } from 'state/sites/selectors';
import { recordTracksEvent } from 'state/analytics/actions';
Expand Down Expand Up @@ -51,7 +51,7 @@ class UpgradeNudgeExpanded extends Component {
//Display only if upgrade path available
if (
! this.props.currentPlan ||
( this.props.planConstants.availableFor && ! this.props.planConstants.availableFor( this.props.currentPlan.productSlug ) )
( this.props.planConstants.availableFor && ! this.props.planConstants.availableFor( this.props.currentPlan.product_slug ) )
) {
return null;
}
Expand Down Expand Up @@ -137,7 +137,7 @@ UpgradeNudgeExpanded.propTypes = {

const mapStateToProps = ( state, { plan = PLAN_PERSONAL } ) => ( {
plan: getPlanBySlug( state, plan ),
currentPlan: getCurrentPlan( state, getSelectedSiteId( state ) ),
currentPlan: getSitePlan( state, getSelectedSiteId( state ) ),
planConstants: plansList[ plan ],
planClass: getPlanClass( plan ),
siteSlug: getSiteSlug( state, getSelectedSiteId( state ) )
Expand Down

0 comments on commit f4cff3e

Please sign in to comment.