Skip to content

Commit e7ccf7b

Browse files
Merge pull request #1183 from KevinLeigh/issue-980-track-subtrack-ordering
Issue #980: Member profile: Order of icons under profile photo should be the same as the Track and subtracks list
2 parents 9110f3b + 3be882e commit e7ccf7b

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/shared/containers/Profile.jsx

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,20 @@ class ProfileContainer extends React.Component {
4848
return <Error404 />;
4949
}
5050

51+
if (info && info.tracks && info.tracks.length > 0) {
52+
const trackRankings = {
53+
COPILOT: 0,
54+
DATA_SCIENCE: 1,
55+
DESIGN: 2,
56+
DEVELOP: 3,
57+
};
58+
info.tracks.sort((track1, track2) => {
59+
const track1Ranking = trackRankings[track1];
60+
const track2Ranking = trackRankings[track2];
61+
return track2Ranking - track1Ranking;
62+
});
63+
}
64+
5165
return achievements && info && skills && stats
5266
? (
5367
<ProfilePage

0 commit comments

Comments
 (0)