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 ? (