diff --git a/apps/theme/layouts/forms/DefaultFormLayout.tsx b/apps/theme/layouts/forms/DefaultFormLayout.tsx index b4b130ebe1a..537486e69da 100644 --- a/apps/theme/layouts/forms/DefaultFormLayout.tsx +++ b/apps/theme/layouts/forms/DefaultFormLayout.tsx @@ -67,9 +67,8 @@ const DefaultFormLayout: FormLayoutComponent = ({ // All form fields - an array of rows where each row is an array that contain fields. const fields = getFields(currentStepIndex); - /** - * Once the data is successfully submitted, we show a success message. - */ + + // Once the data is successfully submitted, we show a success message. const submitForm = async (data: Record): Promise => { if (isLastStep) { setLoading(true); @@ -118,7 +117,7 @@ const DefaultFormLayout: FormLayoutComponent = ({ > Previous Step - {currentStepIndex === formData.steps.length - 1 ? ( + {isLastStep ? ( - {currentStepIndex === formData.steps.length - 1 ? ( + {isLastStep ? (