@selfcommunity/react-core 0.6.4-courses.156 → 0.6.4-courses.158
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -44,7 +44,7 @@ function useSCFetchLesson({ id = null, lesson = null, courseId = null, sectionId
|
|
|
44
44
|
}
|
|
45
45
|
return Promise.resolve(res.data);
|
|
46
46
|
});
|
|
47
|
-
}, []);
|
|
47
|
+
}, [courseId, sectionId, id]);
|
|
48
48
|
/**
|
|
49
49
|
* If id attempt to get the lesson by id
|
|
50
50
|
*/
|
|
@@ -61,7 +61,7 @@ function useSCFetchLesson({ id = null, lesson = null, courseId = null, sectionId
|
|
|
61
61
|
utils_1.Logger.error(Errors_1.SCOPE_SC_CORE, err.message);
|
|
62
62
|
});
|
|
63
63
|
}
|
|
64
|
-
}, [
|
|
64
|
+
}, [__lessonId, courseId, sectionId]);
|
|
65
65
|
(0, use_deep_compare_effect_1.useDeepCompareEffectNoCheck)(() => {
|
|
66
66
|
if (lesson) {
|
|
67
67
|
setSCLesson(lesson);
|
|
@@ -42,7 +42,7 @@ export default function useSCFetchLesson({ id = null, lesson = null, courseId =
|
|
|
42
42
|
}
|
|
43
43
|
return Promise.resolve(res.data);
|
|
44
44
|
});
|
|
45
|
-
}, []);
|
|
45
|
+
}, [courseId, sectionId, id]);
|
|
46
46
|
/**
|
|
47
47
|
* If id attempt to get the lesson by id
|
|
48
48
|
*/
|
|
@@ -59,7 +59,7 @@ export default function useSCFetchLesson({ id = null, lesson = null, courseId =
|
|
|
59
59
|
Logger.error(SCOPE_SC_CORE, err.message);
|
|
60
60
|
});
|
|
61
61
|
}
|
|
62
|
-
}, [
|
|
62
|
+
}, [__lessonId, courseId, sectionId]);
|
|
63
63
|
useDeepCompareEffectNoCheck(() => {
|
|
64
64
|
if (lesson) {
|
|
65
65
|
setSCLesson(lesson);
|