diff --git a/src/CourseAuthoringPage.jsx b/src/CourseAuthoringPage.jsx index 3e6b50f2e..c442f9406 100644 --- a/src/CourseAuthoringPage.jsx +++ b/src/CourseAuthoringPage.jsx @@ -54,9 +54,9 @@ const CourseAuthoringPage = ({ courseId, children }) => { const courseDetailStatus = useSelector(state => state.courseDetail.status); const inProgress = courseDetailStatus === RequestStatus.IN_PROGRESS; const { pathname } = useLocation(); - const showHeader = !pathname.includes('/editor'); + const isEditor = pathname.includes('/editor'); - if (courseDetailStatus === RequestStatus.NOT_FOUND) { + if (courseDetailStatus === RequestStatus.NOT_FOUND && !isEditor) { return ( ); @@ -72,8 +72,8 @@ const CourseAuthoringPage = ({ courseId, children }) => { using url pattern containing /editor/, we shouldn't have the header and footer on these pages. This functionality will be removed in TNL-9591 */} - {inProgress ? showHeader && - : (showHeader && ( + {inProgress ? !isEditor && + : (!isEditor && ( { ) )} {children} - {!inProgress && showHeader && } + {!inProgress && !isEditor && } ); };