Skip to content

Commit

Permalink
[Landing] Fix purchase button not showing up after latest price change
Browse files Browse the repository at this point in the history
  • Loading branch information
brunolemos committed Jul 27, 2020
1 parent d1ee4eb commit be6e65e
Showing 1 changed file with 6 additions and 38 deletions.
44 changes: 6 additions & 38 deletions landing/src/components/sections/CTAButtons.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,12 @@ export default function CTAButtons(props: CTAButtonsProps) {
{os ? `Download for ${getSystemLabel(os)}` : 'Download'}
</Button>
</>
) : os ? (
) : (
<>
{/*
{paidPlans.length === 1 &&
paidPlans[0] &&
!paidPlans[0].interval &&
paidPlans[0].amount ? (
paidPlans[0].amount &&
!paidPlans[0].interval ? (
<Button
className="mb-2 mr-2"
href={
Expand All @@ -62,7 +61,8 @@ export default function CTAButtons(props: CTAButtonsProps) {
>
{`Purchase${priceLabel ? ` for ${priceLabel}` : ''}`}
</Button>
) : paidPlans.length === 1 && paidPlans[0] ? (
) : paidPlans[0] &&
paidPlans.some(plan => !!(plan && plan.amount)) ? (
<Button
type="primary"
href={`/${getPurchaseOrSubscribeRoute(plans)}`}
Expand All @@ -78,47 +78,15 @@ export default function CTAButtons(props: CTAButtonsProps) {
: 'Purchase'}
</Button>
) : (
<Button
type="primary"
href="/pricing"
target="_top"
className="mb-2 mr-2"
>
{paidPlans[0] && paidPlans[0].trialPeriodDays
? 'Start free trial'
: 'See pricing'}
</Button>
)}
*/}

{!!(
(freeTrialDays || freePlan) &&
plans.some(plan => !!plan && !plan.amount)
) && (
<Button
type="primary"
href="/download?autostart"
className="mb-2 mr-2"
>
{`Download for ${getSystemLabel(os)}`}
{os ? `Download for ${getSystemLabel(os)}` : 'Download'}
</Button>
)}

<Button
type="neutral"
href={constants.APP_BASE_URL}
target="_top"
className="mb-2"
>
Use web version
</Button>
</>
) : (
<>
<Button type="primary" href="/download" className="mb-2">
Download the app
</Button>

<Button
type="neutral"
href={constants.APP_BASE_URL}
Expand Down

0 comments on commit be6e65e

Please sign in to comment.