@@ -14,16 +14,13 @@ import { mdiExclamation } from '@mdi/js'
1414import { useI18n } from '../../../lib/hooks/useI18n'
1515import { lngKeys } from '../../../lib/i18n/types'
1616import { Translation } from 'react-i18next'
17- import { SubscriptionPeriod } from '../../../lib/stripe'
1817import Flexbox from '../../../../design/components/atoms/Flexbox'
19- import Switch from '../../../../design/components/atoms/Switch'
2018
2119const DiscountModal = ( ) => {
2220 const { openSettingsTab } = useSettings ( )
2321 const { closeAllModals } = useModal ( )
2422 const { team, subscription } = usePage ( )
2523 const { translate } = useI18n ( )
26- const [ period , setPeriod ] = useState < SubscriptionPeriod > ( 'yearly' )
2724
2825 const isTimeEligible = useMemo ( ( ) => {
2926 if ( team == null ) {
@@ -72,29 +69,18 @@ const DiscountModal = () => {
7269 ) }
7370 < Flexbox className = 'plans__period' justifyContent = 'center' >
7471 < span > Annual</ span >
75- < Switch
76- checked = { period === 'monthly' }
77- inverted = { true }
78- disabled = { setPeriod == null }
79- onChange = { ( ) => {
80- if ( setPeriod != null ) {
81- setPeriod ( period === 'yearly' ? 'monthly' : 'yearly' )
82- }
83- } }
84- />
85- < span > Monthly</ span >
8672 </ Flexbox >
8773 < PlanTables
8874 team = { team }
8975 selectedPlan = { 'free' }
90- period = { period }
76+ period = { 'yearly' }
9177 discounted = { isTimeEligible }
9278 onStandardCallback = {
9379 isTimeEligible
9480 ? ( ) => {
9581 openSettingsTab ( 'teamUpgrade' , {
9682 initialPlan : 'standard' ,
97- initialPeriod : period ,
83+ initialPeriod : 'yearly' ,
9884 tabState : 'form' ,
9985 } )
10086 closeAllModals ( )
@@ -106,7 +92,7 @@ const DiscountModal = () => {
10692 ? ( ) => {
10793 openSettingsTab ( 'teamUpgrade' , {
10894 initialPlan : 'pro' ,
109- initialPeriod : period ,
95+ initialPeriod : 'yearly' ,
11096 tabState : 'form' ,
11197 } )
11298 closeAllModals ( )
0 commit comments