Skip to content

Commit 1e5bb8a

Browse files
committed
Fixed handle colors for zero rating
1 parent 940d6a9 commit 1e5bb8a

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/shared/components/Leaderboard/LeaderboardTable/index.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,15 +93,15 @@ export default function LeaderboardTable(props) {
9393
<div
9494
styleName={`${stylesName}.handle-link`}
9595
onClick={() => onUsernameClick(competitor)}
96-
style={{ color: rating ? getRatingColor(rating) : null }}
96+
style={{ color: rating !== undefined ? getRatingColor(rating) : null }}
9797
>
9898
{competitor['member_profile_basic.handle'] || competitor.handle}
9999
</div>
100100
) : (
101101
<a
102102
href={`${window.origin}/members/${competitor['member_profile_basic.handle'] || competitor.handle}/`}
103103
target={`${_.includes(window.origin, 'www') ? '_self' : '_blank'}`}
104-
style={{ color: rating ? getRatingColor(rating) : null }}
104+
style={{ color: rating !== undefined ? getRatingColor(rating) : null }}
105105
>
106106
{competitor['member_profile_basic.handle'] || competitor.handle}
107107
</a>

src/shared/components/Leaderboard/PodiumSpot/index.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ export default function PodiumSpot(props) {
160160
<div
161161
styleName={`${stylesName}.handle-link`}
162162
onClick={() => onUsernameClick(competitor)}
163-
style={{ color: rating ? getRatingColor(rating) : null }}
163+
style={{ color: rating !== undefined ? getRatingColor(rating) : null }}
164164
>
165165
{competitor['member_profile_basic.handle'] || competitor.handle}
166166
</div>
@@ -169,7 +169,7 @@ export default function PodiumSpot(props) {
169169
styleName={`${stylesName}.profile-link`}
170170
href={`${window.origin}/members/${competitor['member_profile_basic.handle'] || competitor.handle}/`}
171171
target={`${_.includes(window.origin, 'www') ? '_self' : '_blank'}`}
172-
style={{ color: rating ? getRatingColor(rating) : null }}
172+
style={{ color: rating !== undefined ? getRatingColor(rating) : null }}
173173
>
174174
{competitor['member_profile_basic.handle'] || competitor.handle}
175175
</a>

0 commit comments

Comments
 (0)