CourseData component.
This component is responsible for displaying the data of a course.
It uses the useState hook from React to manage the state of the delete modal and selected course id.
The component also uses the useNavigate hook from React Router to navigate between pages.
The handleDeleteCourse function is used to delete a course.
The openDeleteModal function is used to open the delete modal.
The closeDeleteModal function is used to close the delete modal.
The useEffect hook is used to add or remove the 'overflow-hidden' class from the body based on the state of the delete modal.
The handleDelete function is used to delete a course if a course id is selected.
CourseData component. This component is responsible for displaying the data of a course. It uses the useState hook from React to manage the state of the delete modal and selected course id. The component also uses the useNavigate hook from React Router to navigate between pages. The handleDeleteCourse function is used to delete a course. The openDeleteModal function is used to open the delete modal. The closeDeleteModal function is used to close the delete modal. The useEffect hook is used to add or remove the 'overflow-hidden' class from the body based on the state of the delete modal. The handleDelete function is used to delete a course if a course id is selected.