File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ import { Link } from "react-router-dom";
88import AsAvatarUser from "../../interactions/User/AsAvatarUser" ;
99import messages from "./Messages" ;
1010import "./Leaderboard.scss" ;
11+ import SvgSymbol from "../../components/SvgSymbol/SvgSymbol" ;
1112
1213class CardLeaderboard extends Component {
1314 state = {
@@ -28,9 +29,27 @@ class CardLeaderboard extends Component {
2829 const topChallengeItems = this . props . suppressTopChallenges
2930 ? null
3031 : _map ( leader . topChallenges . slice ( 0 , this . props . maxTopChallenges ) , ( challenge ) => (
31- < li key = { challenge . id } >
32- < Link to = { `/browse/challenges/${ challenge . id } ` } title = { challenge . name } >
32+ < li
33+ key = { challenge . id }
34+ className = {
35+ challenge . status === 5
36+ ? "mr-text-green-lighter mr-flex mr-items-center mr-justify-center"
37+ : "mr-flex mr-items-center mr-justify-center"
38+ }
39+ >
40+ < Link
41+ to = { `/browse/challenges/${ challenge . id } ` }
42+ title = { challenge . name }
43+ className = "mr-flex mr-items-center mr-justify-center"
44+ >
3345 { _truncate ( challenge . name , { length : 35 } ) }
46+ { challenge . status === 5 && (
47+ < SvgSymbol
48+ sym = "check-circled-icon"
49+ viewBox = "0 0 20 20"
50+ className = "mr-fill-current mr-w-4 mr-h-4 mr-ml-2 mr-text-green"
51+ />
52+ ) }
3453 </ Link >
3554 </ li >
3655 ) ) ;
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ import PropTypes from "prop-types";
55import { Component } from "react" ;
66import { FormattedMessage , FormattedNumber } from "react-intl" ;
77import { Link } from "react-router-dom" ;
8+ import SvgSymbol from "../../components/SvgSymbol/SvgSymbol" ;
89import AsAvatarUser from "../../interactions/User/AsAvatarUser" ;
910import messages from "./Messages" ;
1011import "./Leaderboard.scss" ;
@@ -32,6 +33,13 @@ class RowLeaderboard extends Component {
3233 < Link to = { `/browse/challenges/${ challenge . id } ` } title = { challenge . name } >
3334 { _truncate ( challenge . name , { length : 35 } ) }
3435 </ Link >
36+ { challenge . status === 5 ? (
37+ < SvgSymbol
38+ sym = "check-icon"
39+ viewBox = "0 0 20 20"
40+ className = "mr-fill-current mr-w-4 mr-h-4"
41+ />
42+ ) : null }
3543 </ li >
3644 ) ) ;
3745
You can’t perform that action at this time.
0 commit comments