Skip to content

Commit 9f9f782

Browse files
Highlight youtube sub in profile
1 parent b24e0b7 commit 9f9f782

File tree

1 file changed

+23
-4
lines changed

1 file changed

+23
-4
lines changed

newIDE/app/src/Profile/ProfileDetails.js

+23-4
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,12 @@ const ProfileDetails = ({
126126
(achievements &&
127127
achievements.find(achievement => achievement.id === 'twitter-follow')) ||
128128
null;
129+
const youtubeSubscriptionAchievement =
130+
(achievements &&
131+
achievements.find(
132+
achievement => achievement.id === 'youtube-subscription'
133+
)) ||
134+
null;
129135

130136
const [
131137
discordUsernameSyncStatus,
@@ -307,6 +313,23 @@ const ProfileDetails = ({
307313
isNotFilled: !twitterUsername,
308314
icon: communityLinksConfig.twitterUsername.icon,
309315
},
316+
{
317+
text: !youtubeUsername ? (
318+
<MarkdownText
319+
translatableSource={communityLinksConfig.youtubeUsername.getRewardMessage(
320+
false,
321+
youtubeSubscriptionAchievement &&
322+
youtubeSubscriptionAchievement.rewardValueInCredits
323+
? youtubeSubscriptionAchievement.rewardValueInCredits.toString()
324+
: '-'
325+
)}
326+
/>
327+
) : (
328+
youtubeUsername
329+
),
330+
isNotFilled: !youtubeUsername,
331+
icon: communityLinksConfig.youtubeUsername.icon,
332+
},
310333
{
311334
text: !tiktokUsername ? (
312335
<MarkdownText
@@ -336,10 +359,6 @@ const ProfileDetails = ({
336359
text: facebookUsername,
337360
icon: communityLinksConfig.facebookUsername.icon,
338361
},
339-
{
340-
text: youtubeUsername,
341-
icon: communityLinksConfig.youtubeUsername.icon,
342-
},
343362
{
344363
text: instagramUsername,
345364
icon: communityLinksConfig.instagramUsername.icon,

0 commit comments

Comments
 (0)