Skip to content

Commit ee12684

Browse files
committed
feat(leaderboard): increase maximum visible courses to 7
Updates the maximum number of visible courses in the leaderboard entries table from 5 to 7. Adjusts the calculations for visible and hidden courses to reflect this change, enhancing the user experience by displaying more course options at once.
1 parent 9bc0f59 commit ee12684

File tree

1 file changed

+3
-3
lines changed
  • app/components/leaderboard-page/entries-table

1 file changed

+3
-3
lines changed

app/components/leaderboard-page/entries-table/row.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ interface Signature {
1313
};
1414
}
1515

16-
const MAX_VISIBLE_COURSES = 5;
16+
const MAX_VISIBLE_COURSES = 7;
1717

1818
export default class LeaderboardPageEntriesTableRow extends Component<Signature> {
1919
@service declare authenticator: AuthenticatorService;
@@ -23,11 +23,11 @@ export default class LeaderboardPageEntriesTableRow extends Component<Signature>
2323
}
2424

2525
get visibleCourses(): CourseModel[] {
26-
return this.args.entry.relatedCourses.slice(-(MAX_VISIBLE_COURSES - 1));
26+
return this.args.entry.relatedCourses.slice(-MAX_VISIBLE_COURSES);
2727
}
2828

2929
get hiddenCourses(): CourseModel[] {
30-
return this.args.entry.relatedCourses.slice(0, -(MAX_VISIBLE_COURSES - 1));
30+
return this.args.entry.relatedCourses.slice(0, -MAX_VISIBLE_COURSES);
3131
}
3232
}
3333

0 commit comments

Comments
 (0)