diff --git a/src/index.scss b/src/index.scss
index ede76bef6b..555c5b8f7e 100755
--- a/src/index.scss
+++ b/src/index.scss
@@ -4,6 +4,8 @@
@import "~@edx/brand/paragon/overrides";
@import "~@edx/frontend-component-footer/dist/footer";
+@import "~@edx/frontend-component-header/dist/index";
+
#root {
display: flex;
diff --git a/src/tab-page/TabPage.jsx b/src/tab-page/TabPage.jsx
index 5c2b692e11..3b9dea60c6 100644
--- a/src/tab-page/TabPage.jsx
+++ b/src/tab-page/TabPage.jsx
@@ -38,18 +38,6 @@ const TabPage = ({ intl, ...props }) => {
title,
} = useModel('courseHomeMeta', courseId);
- if (courseStatus === 'loading') {
- return (
- <>
-
-
-
- >
- );
- }
-
if (courseStatus === 'denied') {
const redirectUrl = getAccessDeniedRedirectUrl(courseId, activeTabSlug, courseAccess, start);
if (redirectUrl) {
@@ -57,41 +45,41 @@ const TabPage = ({ intl, ...props }) => {
}
}
- // Either a success state or a denied state that wasn't redirected above (some tabs handle denied states themselves,
- // like the outline tab handling unenrolled learners)
- if (courseStatus === 'loaded' || courseStatus === 'denied') {
- return (
- <>
- dispatch(setCallToActionToast({ header: '', link: null, link_text: null }))}
- show={!!(toastHeader)}
- >
- {toastHeader}
-
- {metadataModel === 'courseHomeMeta' && ()}
-
-
-
- >
- );
- }
-
- // courseStatus 'failed' and any other unexpected course status.
return (
<>
-
-
- {intl.formatMessage(messages.failure)}
-
+ {['loaded', 'denied'].includes(courseStatus) && (
+ <>
+ dispatch(setCallToActionToast({ header: '', link: null, link_text: null }))}
+ show={!!(toastHeader)}
+ >
+ {toastHeader}
+
+ {metadataModel === 'courseHomeMeta' && ()}
+ >
+ )}
+
+
+
+ {courseStatus === 'loading' && (
+
+ )}
+
+ {['loaded', 'denied'].includes(courseStatus) && (
+
+ )}
+
+ {/* courseStatus 'failed' and any other unexpected course status. */}
+ {(!['loading', 'loaded', 'denied'].includes(courseStatus)) && (
+
+ {intl.formatMessage(messages.failure)}
+
+ )}
>
);