This commit is contained in:
Harikrishnan Gopal
2025-01-22 11:22:42 +05:30
parent 1fc49ca69a
commit 9e1734e395
7 changed files with 133 additions and 9 deletions

View File

@@ -99,15 +99,20 @@ const CourseForm = () => {
await updateCourseStatus(course?.courseId || id);
console.log("Form submitted successfully:", payload);
const filteredCourses = JSON.parse(localStorage.getItem("filteredCourses")) || [];
// Redirect to courses page after successful submission
navigate("/courses", {
state: {
courses: filteredCourses,
updatedCourse: {
...course,
status: "Submitted",
},
},
});
} catch (error) {
console.error("Failed to save appointment:", error);
}