Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions pcweb/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@

# Pricing
PRO_TIERS_TABLE = {
"Pro 25": {"price": 25, "credits": 500},
"Pro 50": {"price": 50, "credits": 1000},
"Pro 100": {"price": 100, "credits": 2000},
"Pro 250": {"price": 250, "credits": 5000},
Expand Down
4 changes: 2 additions & 2 deletions pcweb/pages/pricing/plan_cards.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class SelectedTier(TypedDict):


class ProTierState(rx.State):
credits: rx.Field[int] = rx.field(default=1000)
credits: rx.Field[int] = rx.field(default=PRO_TIERS_TABLE["Pro 25"]["credits"])

@rx.event
def redirect_to_billing(self, yearly: bool = False):
Expand All @@ -42,7 +42,7 @@ def selected_tier(self) -> SelectedTier:
for tier_name, tier_data in PRO_TIERS_TABLE.items():
if tier_data["credits"] == self.credits:
return SelectedTier(tier=tier_name, price=tier_data["price"])
return SelectedTier(tier="Pro", price=PRO_TIERS_TABLE["Pro 50"]["price"])
return SelectedTier(tier="Pro 25", price=PRO_TIERS_TABLE["Pro 25"]["price"])


class Feature(NamedTuple):
Expand Down