Skip to content

Commit

Permalink
A4A> Referrals: Fix the WPCOM hosting when the refer mode is on (#94402)
Browse files Browse the repository at this point in the history
  • Loading branch information
yashwin authored Sep 12, 2024
1 parent 62f150c commit 8a50846
Showing 1 changed file with 9 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,11 @@ function PlanDetails( {
</div>

<div className="wpcom-plan-selector__cta">
<div className="wpcom-plan-selector__cta-label">
{ translate( 'How many sites would you like to buy?' ) }
</div>

{ ! referralMode && (
<div className="wpcom-plan-selector__cta-label">
{ translate( 'How many sites would you like to buy?' ) }
</div>
) }
<div className="wpcom-plan-selector__cta-component">
<Button
className="wpcom-plan-selector__cta-button"
Expand Down Expand Up @@ -179,6 +180,8 @@ export default function WPCOMPlanSelector( { onSelect }: WPCOMPlanSelectorProps
// Show the WPCOM slider if the user has less than 10 plans and is not in referral mode.
const showWPCOMSlider = ! referralMode && ownedPlans < MAX_PLANS_FOR_SLIDER;

const displayQuantity = referralMode ? 1 : quantity;

return (
<div
className={ clsx( 'wpcom-plan-selector', {
Expand All @@ -188,7 +191,7 @@ export default function WPCOMPlanSelector( { onSelect }: WPCOMPlanSelectorProps
<div className="wpcom-plan-selector__slider-container">
{ showWPCOMSlider && (
<WPCOMPlanSlider
quantity={ quantity }
quantity={ displayQuantity }
onChange={ setQuantity }
ownedPlans={ ownedPlans }
/>
Expand All @@ -202,7 +205,7 @@ export default function WPCOMPlanSelector( { onSelect }: WPCOMPlanSelectorProps
onSelect={ onSelect }
ownedPlans={ ownedPlans }
referralMode={ referralMode }
quantity={ quantity }
quantity={ displayQuantity }
setQuantity={ setQuantity }
/>
) : (
Expand Down

0 comments on commit 8a50846

Please sign in to comment.