import React from 'react'; import { Navigate, Routes, Route, useParams, } from 'react-router-dom'; import { getConfig } from '@edx/frontend-platform'; import { PageWrap } from '@edx/frontend-platform/react'; import { Textbooks } from 'CourseAuthoring/textbooks'; import CourseAuthoringPage from './CourseAuthoringPage'; import { PagesAndResources } from './pages-and-resources'; import EditorContainer from './editors/EditorContainer'; import VideoSelectorContainer from './selectors/VideoSelectorContainer'; import CustomPages from './custom-pages'; import { FilesPage, VideosPage } from './files-and-videos'; import { AdvancedSettings } from './advanced-settings'; import { CourseOutline } from './course-outline'; import ScheduleAndDetails from './schedule-and-details'; import { GradingSettings } from './grading-settings'; import CourseTeam from './course-team/CourseTeam'; import { CourseUpdates } from './course-updates'; import { CourseUnit } from './course-unit'; import { Certificates } from './certificates'; import CourseExportPage from './export-page/CourseExportPage'; import CourseImportPage from './import-page/CourseImportPage'; import { DECODED_ROUTES } from './constants'; import CourseChecklist from './course-checklist'; import GroupConfigurations from './group-configurations'; /** * As of this writing, these routes are mounted at a path prefixed with the following: * * /course/:courseId * * Meaning that their absolute paths look like: * * /course/:courseId/course-pages * /course/:courseId/proctored-exam-settings * /course/:courseId/editor/:blockType/:blockId * * This component and CourseAuthoringPage should maybe be combined once we no longer need to have * CourseAuthoringPage split out for use in LegacyProctoringRoute. Once that route is removed, we * can move the Header/Footer rendering to this component and likely pull the course detail loading * in as well, and it'd feel a bit better-factored and the roles would feel more clear. */ const CourseAuthoringRoutes = () => { const { courseId } = useParams(); return ( } /> } /> } /> : null} /> } /> } /> } /> {DECODED_ROUTES.COURSE_UNIT.map((path) => ( } /> ))} } /> } /> } /> } /> } /> } /> } /> } /> } /> } /> } /> } /> ); }; export default CourseAuthoringRoutes;