-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/20230608 julian #851
Merged
Luphia
merged 5 commits into
feature/getPersonalAchievement
from
feature/20230608_julian
Jun 10, 2023
Merged
Changes from 3 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -113,23 +113,23 @@ const LeaderboardTab = ({timeSpan, setTimeSpan, rankings}: LeaderboardTabProps) | |
{ | ||
sorted: 0, | ||
rank: 2, | ||
marginTop: 'mt-28 md:mt-24', | ||
marginTop: 'mt-24', | ||
crown: '/leaderboard/[email protected]', | ||
star: '/leaderboard/silver_star.svg', | ||
medalist: '/leaderboard/silver_medalist.svg', | ||
}, | ||
{ | ||
sorted: 1, | ||
rank: 1, | ||
marginTop: 'mt-20 md:mt-8', | ||
marginTop: 'mt-20 md:mt-12', | ||
crown: '/leaderboard/[email protected]', | ||
star: '/leaderboard/gold_star.svg', | ||
medalist: '/leaderboard/gold_medalist.svg', | ||
}, | ||
{ | ||
sorted: 2, | ||
rank: 3, | ||
marginTop: 'mt-32', | ||
marginTop: 'mt-28 md:mt-32', | ||
crown: '/leaderboard/[email protected]', | ||
star: '/leaderboard/bronze_star.svg', | ||
medalist: '/leaderboard/bronze_medalist.svg', | ||
|
@@ -167,10 +167,7 @@ const LeaderboardTab = ({timeSpan, setTimeSpan, rankings}: LeaderboardTabProps) | |
? defaultTop3Data | ||
: { | ||
/* Info: (20230607 - Julian) If User Name length > 20, then truncate */ | ||
name: | ||
rankingData[rank - 1]?.userName.length > 20 | ||
? accountTruncate(rankingData[rank - 1]?.userName) | ||
: rankingData[rank - 1]?.userName, | ||
name: accountTruncate(rankingData[rank - 1]?.userName, 20), | ||
id: rankingData[rank - 1]?.userId, | ||
avatar: rankingData[rank - 1]?.userAvatar ?? DEFAULT_USER_AVATAR, | ||
displayedPnl: displayPnl(rankingData[rank - 1]?.cumulativePnl), | ||
|
@@ -242,7 +239,7 @@ const LeaderboardTab = ({timeSpan, setTimeSpan, rankings}: LeaderboardTabProps) | |
|
||
const displayedTop3 = ( | ||
<div className="relative w-screen md:w-8/10"> | ||
<div className="absolute -top-48 flex w-full justify-between space-x-4 px-4 md:-top-72 md:px-16"> | ||
<div className="absolute -top-48 flex w-full justify-between space-x-4 px-4 md:-top-60 md:px-16"> | ||
{displayedTop3List} | ||
</div> | ||
<Image | ||
|
@@ -279,9 +276,7 @@ const LeaderboardTab = ({timeSpan, setTimeSpan, rankings}: LeaderboardTabProps) | |
|
||
const displayedRank = rank <= 0 ? '-' : rank; | ||
const displayedPnl = rank <= 0 ? '-' : displayPnl(cumulativePnl); | ||
/* Info: (20230607 - Julian) If User Name length > 20, then truncate */ | ||
const displayedName = | ||
rank <= 0 ? 'N/A' : userName.length > 20 ? accountTruncate(userName) : userName; | ||
const displayedName = rank <= 0 ? 'N/A' : accountTruncate(userName, 20); | ||
const displayedAvatar = rank <= 0 ? DEFAULT_USER_AVATAR : userAvatar; | ||
return isLoading ? ( | ||
<div key={rank} className="flex items-center justify-between px-4 py-6"> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return 不能有判斷式