Skip to content

Commit d0adbb6

Browse files
committed
FixedLinterErrors
1 parent 8b14c82 commit d0adbb6

File tree

1 file changed

+7
-13
lines changed
  • app/components/user-page/course-progress-list-item

1 file changed

+7
-13
lines changed

app/components/user-page/course-progress-list-item/index.js

+7-13
Original file line numberDiff line numberDiff line change
@@ -36,29 +36,23 @@ export default class CourseProgressListItemComponent extends Component {
3636
}
3737
}
3838

39-
@action
40-
41-
navigateToCourse() {
42-
this.router.transitionTo('course-overview', this.course.slug);
43-
}
44-
4539
get languagesToDisplay() {
4640
const completedParticipations = this.completedCourseParticipations.sort(
47-
(a, b) => new Date(b.completedAt).getTime() - new Date(a.completedAt).getTime()
41+
(a, b) => new Date(b.completedAt).getTime() - new Date(a.completedAt).getTime(),
4842
);
49-
5043
const incompleteParticipations = this.args.courseParticipations
51-
.filter(p => !p.isCompleted)
44+
.filter((p) => !p.isCompleted)
5245
.sort((a, b) => new Date(b.lastSubmissionAt).getTime() - new Date(a.lastSubmissionAt).getTime());
5346

5447
if (completedParticipations.length >= MAX_LANGUAGES_TO_DISPLAY) {
5548
return completedParticipations.slice(0, MAX_LANGUAGES_TO_DISPLAY);
5649
}
5750

58-
return [
59-
...completedParticipations,
60-
...incompleteParticipations.slice(0, MAX_LANGUAGES_TO_DISPLAY - completedParticipations.length)
61-
];
51+
return [...completedParticipations, ...incompleteParticipations.slice(0, MAX_LANGUAGES_TO_DISPLAY - completedParticipations.length)];
6252
}
6353

54+
@action
55+
navigateToCourse() {
56+
this.router.transitionTo('course-overview', this.course.slug);
57+
}
6458
}

0 commit comments

Comments
 (0)