AA-124: Refactor enrollment alerts (#126)

- Place them only on the Outline page
- Support a few cases where enrollment isn't actually allowed
This commit is contained in:
Michael Terry
2020-07-30 12:51:17 -04:00
committed by GitHub
parent b048ca8187
commit cd8f3072e2
15 changed files with 76 additions and 85 deletions

View File

@@ -3,7 +3,6 @@ import PropTypes from 'prop-types';
import { Header, CourseTabsNavigation } from '../course-header';
import { useModel } from '../generic/model-store';
import { useEnrollmentAlert } from '../alerts/enrollment-alert';
import InstructorToolbar from '../instructor-toolbar';
function LoadedTabPage({
@@ -12,8 +11,6 @@ function LoadedTabPage({
courseId,
unitId,
}) {
useEnrollmentAlert(courseId);
const {
isStaff,
number,

View File

@@ -3,7 +3,6 @@ import PropTypes from 'prop-types';
import { injectIntl, intlShape } from '@edx/frontend-platform/i18n';
import { Header } from '../course-header';
import { useLogistrationAlert } from '../alerts/logistration-alert';
import PageLoading from '../generic/PageLoading';
import messages from './messages';
@@ -14,8 +13,6 @@ function TabPage({
courseStatus,
...passthroughProps
}) {
useLogistrationAlert();
if (courseStatus === 'loading') {
return (
<>