Skip to content

Commit

Permalink
Price Plans: Display Free Trial & cleanup (#4423)
Browse files Browse the repository at this point in the history
* Price Plans: Display Free Trial & cleanup

* Fix button padding

* Fix grandfathered see the Price table on subscription page
  • Loading branch information
PopDaph authored Mar 25, 2024
1 parent 225405a commit 1b4292c
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 7 deletions.
18 changes: 13 additions & 5 deletions front/components/PlansTables.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -189,18 +189,26 @@ export function ProPriceTable({
/>
)
)}
<PriceTable.ActionContainer>
{plan && plan.code !== PRO_PLAN_SEAT_29_CODE && (

{display === "landing" && (
<PriceTable.ActionContainer>
<div className="text-base font-bold text-action-400">
Try it for free for 2 weeks
</div>
</PriceTable.ActionContainer>
)}
{onClick && (!plan || plan.code !== PRO_PLAN_SEAT_29_CODE) && (
<PriceTable.ActionContainer>
<Button
variant="primary"
size={biggerButtonSize}
label="Start now"
icon={RocketIcon}
disabled={isProcessing || plan.code === PRO_PLAN_SEAT_29_CODE}
disabled={isProcessing}
onClick={onClick}
/>
)}
</PriceTable.ActionContainer>
</PriceTable.ActionContainer>
)}
</PriceTable>
);
}
Expand Down
17 changes: 17 additions & 0 deletions front/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -787,16 +787,33 @@ export default function Home({
size="xs"
className="lg:hidden"
isTabs
onClickProPlan={() =>
(window.location.href = `/api/auth/login?returnTo=${getReturnToUrl(
router.query
)}`)
}
onClickEnterprisePlan={() => setShowContactUsDrawer(true)}
/>
<PricePlans
display="landing"
size="xs"
className="hidden lg:flex xl:hidden"
onClickProPlan={() =>
(window.location.href = `/api/auth/login?returnTo=${getReturnToUrl(
router.query
)}`)
}
onClickEnterprisePlan={() => setShowContactUsDrawer(true)}
/>
<PricePlans
display="landing"
size="sm"
className="hidden xl:flex"
onClickProPlan={() =>
(window.location.href = `/api/auth/login?returnTo=${getReturnToUrl(
router.query
)}`)
}
onClickEnterprisePlan={() => setShowContactUsDrawer(true)}
/>
</div>
Expand Down
4 changes: 2 additions & 2 deletions front/pages/w/[wId]/subscription/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ export default function Subscription({
onClickProPlan={onClickProPlan}
onClickEnterprisePlan={onClickEnterprisePlan}
isProcessing={isProcessing}
display="landing"
display="subscribe"
/>
<PricePlans
size="xs"
Expand All @@ -433,7 +433,7 @@ export default function Subscription({
onClickProPlan={onClickProPlan}
onClickEnterprisePlan={onClickEnterprisePlan}
isProcessing={isProcessing}
display="landing"
display="subscribe"
/>
</div>
</div>
Expand Down

0 comments on commit 1b4292c

Please sign in to comment.