From 01c3870b22d22a9d208d942cab8e3103ba43218f Mon Sep 17 00:00:00 2001 From: Br0wnHammer Date: Wed, 3 Jun 2026 20:15:01 +0530 Subject: [PATCH 1/3] feat(client): enable step wizard on infrastructure and pagespeed create pages --- client/src/Pages/CreateMonitor/index.tsx | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/client/src/Pages/CreateMonitor/index.tsx b/client/src/Pages/CreateMonitor/index.tsx index f34876359..98510b57c 100644 --- a/client/src/Pages/CreateMonitor/index.tsx +++ b/client/src/Pages/CreateMonitor/index.tsx @@ -234,6 +234,9 @@ const CreateMonitorPage = () => { }, [location.pathname]); const showTypeSelector = pageType === "uptime" && !isEditMode; + // The multi-step wizard applies to every create flow; only the monitor-type + // radio is uptime-specific. Edit mode keeps the flat form. + const isWizard = !isEditMode; const defaultType: MonitorType = pageType === "pagespeed" ? "pagespeed" @@ -267,7 +270,7 @@ const CreateMonitorPage = () => { // Multi-step wizard, uptime create only (showTypeSelector). Other flows // keep the flat form, where showStep() is always true. const [currentStep, setCurrentStep] = useState(0); - const showStep = (step: number) => !showTypeSelector || currentStep === step; + const showStep = (step: number) => !isWizard || currentStep === step; const watchedType = watch("type") as MonitorType; const watchedUseAdvancedMatching = watch("useAdvancedMatching") as boolean; @@ -362,7 +365,7 @@ const CreateMonitorPage = () => { refetch={refetchMonitor} onDelete={handleDeleteClick} /> - {showTypeSelector && ( + {isWizard && ( { - {showTypeSelector && ( + {isWizard && ( )} - {showTypeSelector && currentStep < totalSteps - 1 ? ( + {isWizard && currentStep < totalSteps - 1 ? ( )} - {isWizard && currentStep < totalSteps - 1 ? ( + {!isEditMode && currentStep < totalSteps - 1 ? (