We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 82d47e2 commit 4b948d6Copy full SHA for 4b948d6
src/cloud/components/SubscriptionForm/index.tsx
@@ -145,17 +145,10 @@ const SubscriptionForm = ({
145
}, [permissions])
146
147
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])
+ return isTimeEligibleForDiscount(team) && period === 'yearly'
+ ? discountPlans.newSpaceAnnual
+ : undefined
+ }, [team, period])
159
160
return (
161
<Container>
0 commit comments