diff --git a/client/src/Pages/CreateMonitor/index.tsx b/client/src/Pages/CreateMonitor/index.tsx index f34876359..94bed9355 100644 --- a/client/src/Pages/CreateMonitor/index.tsx +++ b/client/src/Pages/CreateMonitor/index.tsx @@ -264,10 +264,10 @@ const CreateMonitorPage = () => { reset(defaults); }, [defaults, reset]); - // Multi-step wizard, uptime create only (showTypeSelector). Other flows - // keep the flat form, where showStep() is always true. + // Multi-step wizard on every create flow; edit mode keeps the flat form + // where showStep() is always true. const [currentStep, setCurrentStep] = useState(0); - const showStep = (step: number) => !showTypeSelector || currentStep === step; + const showStep = (step: number) => isEditMode || currentStep === step; const watchedType = watch("type") as MonitorType; const watchedUseAdvancedMatching = watch("useAdvancedMatching") as boolean; @@ -362,7 +362,7 @@ const CreateMonitorPage = () => { refetch={refetchMonitor} onDelete={handleDeleteClick} /> - {showTypeSelector && ( + {!isEditMode && ( { - {showTypeSelector && ( + {!isEditMode && ( )} - {showTypeSelector && currentStep < totalSteps - 1 ? ( + {!isEditMode && currentStep < totalSteps - 1 ? (