Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/CourseAuthoringPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
<NotFoundAlert />
);
Expand All @@ -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 && <Loading />
: (showHeader && (
{inProgress ? !isEditor && <Loading />
: (!isEditor && (
<AppHeader
courseNumber={courseNumber}
courseOrg={courseOrg}
Expand All @@ -83,7 +83,7 @@ const CourseAuthoringPage = ({ courseId, children }) => {
)
)}
{children}
{!inProgress && showHeader && <StudioFooter />}
{!inProgress && !isEditor && <StudioFooter />}
</div>
);
};
Expand Down