@selfcommunity/react-ui 0.10.2-courses.199 → 0.10.2-courses.200
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.
|
@@ -52,19 +52,19 @@ const classes = {
|
|
|
52
52
|
contrastColor: `${constants_1.PREFIX}-contrast-color`
|
|
53
53
|
};
|
|
54
54
|
function getUrlNextLesson(course) {
|
|
55
|
-
var _a;
|
|
55
|
+
var _a, _b, _c;
|
|
56
56
|
const data = {
|
|
57
57
|
id: course.id,
|
|
58
58
|
slug: course.slug
|
|
59
59
|
};
|
|
60
60
|
if (course.user_completion_rate === 100) {
|
|
61
61
|
Object.assign(data, {
|
|
62
|
-
section_id: course.sections[0].id,
|
|
63
|
-
lesson_id: course.sections[0].lessons[0].id
|
|
62
|
+
section_id: (_a = course.sections) === null || _a === void 0 ? void 0 : _a[0].id,
|
|
63
|
+
lesson_id: (_b = course.sections) === null || _b === void 0 ? void 0 : _b[0].lessons[0].id
|
|
64
64
|
});
|
|
65
65
|
return data;
|
|
66
66
|
}
|
|
67
|
-
(
|
|
67
|
+
(_c = course.sections) === null || _c === void 0 ? void 0 : _c.some((section) => {
|
|
68
68
|
var _a;
|
|
69
69
|
const isNextLessonInThisSection = section.num_lessons_completed < section.num_lessons && !section.locked;
|
|
70
70
|
if (isNextLessonInThisSection) {
|
|
@@ -50,19 +50,19 @@ const classes = {
|
|
|
50
50
|
contrastColor: `${PREFIX}-contrast-color`
|
|
51
51
|
};
|
|
52
52
|
function getUrlNextLesson(course) {
|
|
53
|
-
var _a;
|
|
53
|
+
var _a, _b, _c;
|
|
54
54
|
const data = {
|
|
55
55
|
id: course.id,
|
|
56
56
|
slug: course.slug
|
|
57
57
|
};
|
|
58
58
|
if (course.user_completion_rate === 100) {
|
|
59
59
|
Object.assign(data, {
|
|
60
|
-
section_id: course.sections[0].id,
|
|
61
|
-
lesson_id: course.sections[0].lessons[0].id
|
|
60
|
+
section_id: (_a = course.sections) === null || _a === void 0 ? void 0 : _a[0].id,
|
|
61
|
+
lesson_id: (_b = course.sections) === null || _b === void 0 ? void 0 : _b[0].lessons[0].id
|
|
62
62
|
});
|
|
63
63
|
return data;
|
|
64
64
|
}
|
|
65
|
-
(
|
|
65
|
+
(_c = course.sections) === null || _c === void 0 ? void 0 : _c.some((section) => {
|
|
66
66
|
var _a;
|
|
67
67
|
const isNextLessonInThisSection = section.num_lessons_completed < section.num_lessons && !section.locked;
|
|
68
68
|
if (isNextLessonInThisSection) {
|