diff --git a/src/modules/admin/pages/courses/AddCourse.jsx b/src/modules/admin/pages/courses/AddCourse.jsx index d5d2f42..5d49ae1 100644 --- a/src/modules/admin/pages/courses/AddCourse.jsx +++ b/src/modules/admin/pages/courses/AddCourse.jsx @@ -189,7 +189,12 @@ export default function AddCourse() { } }; - const handleNext = async () => { + const handleNext = async (e) => { + // The Next button occupies the same DOM position as the eventual + // type="submit" Create Course button. Advancing the step re-renders + // that node's type attribute in place *before* the browser evaluates + // this click's default action, which would otherwise submit the form. + e.preventDefault(); if (currentStep === 0) { const valid = await trigger(["title", "subscription", "objectives"]); if (!valid) return;