Skip to content

Commit 5601c8b

Browse files
committed
reset on load
1 parent 704126d commit 5601c8b

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

pcweb/pages/pricing/pricing.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,17 @@
88
from pcweb.pages.pricing.faq import faq
99
from pcweb.pages.pricing.calculator import calculator_section
1010
from pcweb.meta.meta import hosting_meta_tags
11-
from pcweb.pages.pricing.slider_calculator import slider_calculator
11+
from pcweb.pages.pricing.slider_calculator import slider_calculator, MachineState
1212

1313
pricing_path = "/pricing"
1414

1515

16-
@rx.page(route=pricing_path, title="Reflex · Pricing", meta=hosting_meta_tags)
16+
@rx.page(
17+
route=pricing_path,
18+
title="Reflex · Pricing",
19+
meta=hosting_meta_tags,
20+
on_load=MachineState.reset_machines,
21+
)
1722
def pricing() -> rx.Component:
1823
"""Get the Pricing landing page."""
1924
from pcweb.components.docpage.navbar import navbar

pcweb/pages/pricing/slider_calculator.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -467,6 +467,5 @@ def slider_calculator() -> rx.Component:
467467
total_credits_card(),
468468
class_name="flex lg:flex-row flex-col lg:gap-10 gap-6 w-full px-6 h-full",
469469
),
470-
on_mount=[MachineState.reset_machines, MachineState.on_load],
471470
class_name="flex flex-col w-full max-w-[64.19rem] border-t-0 2xl:border-x divide-y divide-slate-4 2xl:border-b pt-[6rem] justify-center items-center",
472471
)

0 commit comments

Comments
 (0)