Separate courses redux model into courseHomeMeta and coursewareMeta (#348)

This commit is contained in:
Michael Terry
2021-01-22 15:28:16 -05:00
committed by GitHub
parent 293dc9f4c3
commit 58543a34b3
39 changed files with 64 additions and 50 deletions

View File

@@ -28,7 +28,7 @@ export function fetchCourse(courseId) {
]).then(([courseMetadataResult, courseBlocksResult]) => {
if (courseMetadataResult.status === 'fulfilled') {
dispatch(addModel({
modelType: 'courses',
modelType: 'coursewareMeta',
model: courseMetadataResult.value,
}));
}
@@ -40,7 +40,7 @@ export function fetchCourse(courseId) {
// This updates the course with a sectionIds array from the blocks data.
dispatch(updateModelsMap({
modelType: 'courses',
modelType: 'coursewareMeta',
modelsMap: courses,
}));
dispatch(addModelsMap({