Skip to content

Commit 4b948d6

Browse files
ButteryCrumpetRokt33r
authored andcommitted
only display discount for yearly
1 parent 82d47e2 commit 4b948d6

File tree

1 file changed

+4
-11
lines changed
  • src/cloud/components/SubscriptionForm

1 file changed

+4
-11
lines changed

src/cloud/components/SubscriptionForm/index.tsx

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -145,17 +145,10 @@ const SubscriptionForm = ({
145145
}, [permissions])
146146

147147
const eligibleDiscount = useMemo(() => {
148-
if (!isTimeEligibleForDiscount(team)) {
149-
return
150-
}
151-
152-
switch (currentPlan) {
153-
default:
154-
return period === 'yearly'
155-
? discountPlans.newSpaceAnnual
156-
: discountPlans.newSpace
157-
}
158-
}, [currentPlan, team, period])
148+
return isTimeEligibleForDiscount(team) && period === 'yearly'
149+
? discountPlans.newSpaceAnnual
150+
: undefined
151+
}, [team, period])
159152

160153
return (
161154
<Container>

0 commit comments

Comments
 (0)