File tree Expand file tree Collapse file tree 2 files changed +9
-10
lines changed
Expand file tree Collapse file tree 2 files changed +9
-10
lines changed Original file line number Diff line number Diff line change 102102
103103# Pricing
104104PRO_TIERS_TABLE = {
105- "Pro" : {"price" : 50 , "credits" : 1000 },
106- "Pro 50 " : {"price" : 100 , "credits" : 2000 },
107- "Pro 100 " : {"price" : 250 , "credits" : 5000 },
108- "Pro 200 " : {"price" : 500 , "credits" : 10000 },
109- "Pro 300 " : {"price" : 750 , "credits" : 15000 },
110- "Pro 400 " : {"price" : 1000 , "credits" : 20000 },
105+ "Pro 50 " : {"price" : 50 , "credits" : 1000 },
106+ "Pro 100 " : {"price" : 100 , "credits" : 2000 },
107+ "Pro 250 " : {"price" : 250 , "credits" : 5000 },
108+ "Pro 500 " : {"price" : 500 , "credits" : 10000 },
109+ "Pro 750 " : {"price" : 750 , "credits" : 15000 },
110+ "Pro 1000 " : {"price" : 1000 , "credits" : 20000 },
111111}
112- PRO_PLAN_COST = 50
Original file line number Diff line number Diff line change 66from typing import NamedTuple
77from reflex .experimental .client_state import ClientStateVar
88from pcweb .components .number_flow import number_flow
9- from pcweb .constants import PRO_TIERS_TABLE , PRO_PLAN_COST
9+ from pcweb .constants import PRO_TIERS_TABLE
1010from typing import TypedDict
1111from urllib .parse import quote_plus
1212
@@ -37,12 +37,12 @@ def redirect_to_billing(self, yearly: bool = False):
3737 def update_credits (self , credits : str ):
3838 self .credits = int (credits .replace ("," , "" ))
3939
40- @rx .var ( initial_value = SelectedTier ( tier = "Pro" , price = PRO_PLAN_COST ))
40+ @rx .var
4141 def selected_tier (self ) -> SelectedTier :
4242 for tier_name , tier_data in PRO_TIERS_TABLE .items ():
4343 if tier_data ["credits" ] == self .credits :
4444 return SelectedTier (tier = tier_name , price = tier_data ["price" ])
45- return SelectedTier (tier = "Pro" , price = PRO_PLAN_COST )
45+ return SelectedTier (tier = "Pro" , price = PRO_TIERS_TABLE [ "Pro 50" ][ "price" ] )
4646
4747
4848class Feature (NamedTuple ):
You can’t perform that action at this time.
0 commit comments