99} from '@openedx/paragon/icons' ;
1010import { useIntl } from '@edx/frontend-platform/i18n' ;
1111
12+ import { useCourseAuthoringContext } from '@src/CourseAuthoringContext' ;
1213import Placeholder from '../editors/Placeholder' ;
1314import { RequestStatus } from '../data/constants' ;
1415import { useGetCourseDetails } from './data/apiHooks' ;
@@ -17,7 +18,6 @@ import InternetConnectionAlert from '../generic/internet-connection-alert';
1718import { STATEFUL_BUTTON_STATES } from '../constants' ;
1819import getPageHeadTitle from '../generic/utils' ;
1920import { useScrollToHashElement } from '../hooks' ;
20- import { useCourseAuthoringContext } from '@src/CourseAuthoringContext' ;
2121import {
2222 fetchCourseSettingsQuery ,
2323 updateCourseDetailsQuery ,
@@ -42,15 +42,15 @@ import { useLoadValuesPrompt, useSaveValuesPrompt } from './hooks';
4242
4343const ScheduleAndDetails = ( ) => {
4444 const intl = useIntl ( ) ;
45- const courseDetails = useGetCourseDetails ( courseId ) ;
4645 const courseSettings = useSelector ( getCourseSettings ) ;
4746 const loadingSettingsStatus = useSelector ( getLoadingSettingsStatus ) ;
48- const isLoading = courseDetails . isLoading
49- || loadingSettingsStatus === RequestStatus . IN_PROGRESS ;
50-
5147 const { courseId, courseDetails : course } = useCourseAuthoringContext ( ) ;
5248 document . title = getPageHeadTitle ( course ?. name || '' , intl . formatMessage ( messages . headingTitle ) ) ;
5349
50+ const courseDetails = useGetCourseDetails ( courseId ) ;
51+ const isLoading = courseDetails . isLoading
52+ || loadingSettingsStatus === RequestStatus . IN_PROGRESS ;
53+
5454 const {
5555 platformName,
5656 isCreditCourse,
0 commit comments