Skip to content

Commit bd2ecf9

Browse files
cuzz-venusclaude
andcommitted
refactor: simplify last cycle summary user rewards card
The last cycle summary user rewards card now always shows the rewards amount (zero when none), so drop the eligibility content override and its translations that are no longer used there. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent b9ef2df commit bd2ecf9

8 files changed

Lines changed: 1 addition & 47 deletions

File tree

apps/evm/src/libs/translations/translations/en.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1262,8 +1262,6 @@
12621262
"title": "End of cycle"
12631263
},
12641264
"lastCycleSummary": {
1265-
"eligibleMessage": "You qualified for Prime in this cycle. Take positions in Prime markets to earn additional rewards.",
1266-
"notEligibleMessage": "You did not qualify for Prime during the last cycle. Stake XVS to compete for Prime in the next cycle.",
12671265
"primeScoreLabel": "Prime score",
12681266
"rankLabel": "Your rank",
12691267
"rankMissed": "Almost there! You weren't in last cycle's top 500. Boost your stake to qualify this cycle.",

apps/evm/src/libs/translations/translations/ja.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1262,8 +1262,6 @@
12621262
"title": "サイクル終了"
12631263
},
12641264
"lastCycleSummary": {
1265-
"eligibleMessage": "今サイクルで Prime の対象になりました。Prime マーケットでポジションを取ると追加報酬を獲得できます。",
1266-
"notEligibleMessage": "前サイクルでは Prime の対象ではありませんでした。XVS をステークして次のサイクルで Prime を目指しましょう。",
12671265
"primeScoreLabel": "Prime スコア",
12681266
"rankLabel": "あなたのランク",
12691267
"rankMissed": "あと一歩です!前サイクルでは上位 500 に入りませんでした。ステーク量を増やして今サイクルでの対象を目指しましょう。",

apps/evm/src/libs/translations/translations/th.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1262,8 +1262,6 @@
12621262
"title": "สิ้นสุดรอบ"
12631263
},
12641264
"lastCycleSummary": {
1265-
"eligibleMessage": "คุณมีสิทธิ์รับ Prime ในรอบนี้ เปิดสถานะในตลาด Prime เพื่อรับรางวัลเพิ่มเติม",
1266-
"notEligibleMessage": "คุณไม่มีสิทธิ์รับ Prime ในรอบที่แล้ว Stake XVS เพื่อแข่งขันรับ Prime ในรอบถัดไป",
12671265
"primeScoreLabel": "คะแนน Prime",
12681266
"rankLabel": "อันดับของคุณ",
12691267
"rankMissed": "ใกล้แล้ว! คุณไม่ได้อยู่ใน Top 500 ของรอบที่แล้ว เพิ่ม stake ของคุณเพื่อให้มีสิทธิ์ในรอบนี้",

apps/evm/src/libs/translations/translations/tr.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1262,8 +1262,6 @@
12621262
"title": "Döngü sonu"
12631263
},
12641264
"lastCycleSummary": {
1265-
"eligibleMessage": "Bu döngüde Prime için uygun oldun. Ek ödül kazanmak için Prime piyasalarında pozisyon al.",
1266-
"notEligibleMessage": "Son döngüde Prime için uygun değildin. Bir sonraki döngüde Prime için yarışmak üzere XVS stake et.",
12671265
"primeScoreLabel": "Prime puanı",
12681266
"rankLabel": "Sıralaman",
12691267
"rankMissed": "Az kaldı! Son döngüde ilk 500 içinde değildin. Bu döngüde uygun olmak için stake'ini artır.",

apps/evm/src/libs/translations/translations/vi.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1262,8 +1262,6 @@
12621262
"title": "Kết thúc chu kỳ"
12631263
},
12641264
"lastCycleSummary": {
1265-
"eligibleMessage": "Bạn đủ điều kiện nhận Prime trong chu kỳ này. Hãy mở vị thế trong các thị trường Prime để nhận thêm phần thưởng.",
1266-
"notEligibleMessage": "Bạn không đủ điều kiện nhận Prime trong chu kỳ trước. Stake XVS để cạnh tranh Prime trong chu kỳ tiếp theo.",
12671265
"primeScoreLabel": "Điểm Prime",
12681266
"rankLabel": "Hạng của bạn",
12691267
"rankMissed": "Sắp được rồi! Bạn không nằm trong Top 500 của chu kỳ trước. Hãy tăng mức stake để đủ điều kiện trong chu kỳ này.",

apps/evm/src/libs/translations/translations/zh-Hans.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1262,8 +1262,6 @@
12621262
"title": "周期结束"
12631263
},
12641264
"lastCycleSummary": {
1265-
"eligibleMessage": "你在本周期已具备 Prime 资格。在 Prime 市场建仓以赚取额外奖励。",
1266-
"notEligibleMessage": "你在上一周期未具备 Prime 资格。质押 XVS 以在下一周期竞争 Prime。",
12671265
"primeScoreLabel": "Prime 分数",
12681266
"rankLabel": "你的排名",
12691267
"rankMissed": "就差一点!你未进入上一周期前 500。提升质押以在本周期获得资格。",

apps/evm/src/libs/translations/translations/zh-Hant.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1262,8 +1262,6 @@
12621262
"title": "週期結束"
12631263
},
12641264
"lastCycleSummary": {
1265-
"eligibleMessage": "你在本週期已具備 Prime 資格。在 Prime 市場建倉以賺取額外獎勵。",
1266-
"notEligibleMessage": "你在上一週期未具備 Prime 資格。質押 XVS 以在下一週期競爭 Prime。",
12671265
"primeScoreLabel": "Prime 分數",
12681266
"rankLabel": "你的排名",
12691267
"rankMissed": "就差一點!你未進入上一週期前 500。提升質押以在本週期獲得資格。",

apps/evm/src/pages/PrimeLeaderboard/LastCycleSummaryModal/index.tsx

Lines changed: 1 addition & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
1-
import { cn } from '@venusprotocol/ui';
21
import BigNumber from 'bignumber.js';
32

4-
import { Icon, Modal } from 'components';
3+
import { Modal } from 'components';
54
import { useGetTokens } from 'libs/tokens';
65
import { useTranslation } from 'libs/translations';
76

8-
import { PrimeRewardBadge } from '../PrimeRewardBadge';
97
import { UserRewardsCard } from '../UserRewardsCard';
108
import { UserRankCard } from './UserRankCard';
119

@@ -15,8 +13,6 @@ const placeholderPrimeScore = new BigNumber(542_500_000);
1513
const placeholderUserRewardsCents = 1_840_000;
1614
const placeholderUserMarketRewardsCents = [1_140_000, 700_000];
1715
const placeholderApyPercentage = 3.78;
18-
const placeholderHasRewards = true;
19-
const placeholderIsEligible = true;
2016

2117
export interface LastCycleSummaryModalProps {
2218
isOpen: boolean;
@@ -39,33 +35,6 @@ export const LastCycleSummaryModal: React.FC<LastCycleSummaryModalProps> = ({
3935
apyPercentage: placeholderApyPercentage,
4036
}));
4137

42-
let userRewardsContent: React.ReactNode;
43-
44-
if (!placeholderHasRewards) {
45-
userRewardsContent = (
46-
<div className="flex items-center gap-x-3">
47-
{placeholderIsEligible ? (
48-
<PrimeRewardBadge />
49-
) : (
50-
<span className="flex size-10 shrink-0 items-center justify-center rounded-lg bg-dark-blue-hover">
51-
<Icon name="person" className="text-light-grey" />
52-
</span>
53-
)}
54-
55-
<p
56-
className={cn(
57-
'flex-1 text-b1r',
58-
placeholderIsEligible ? 'text-light-grey' : 'text-yellow',
59-
)}
60-
>
61-
{placeholderIsEligible
62-
? t('primeLeaderboard.lastCycleSummary.eligibleMessage')
63-
: t('primeLeaderboard.lastCycleSummary.notEligibleMessage')}
64-
</p>
65-
</div>
66-
);
67-
}
68-
6938
return (
7039
<Modal
7140
isOpen={isOpen}
@@ -80,7 +49,6 @@ export const LastCycleSummaryModal: React.FC<LastCycleSummaryModalProps> = ({
8049
title={t('primeLeaderboard.lastCycleSummary.userRewardsTitle')}
8150
totalRewardsCents={placeholderUserRewardsCents}
8251
marketRewards={userMarketRewards}
83-
content={userRewardsContent}
8452
showMarketActions={false}
8553
/>
8654
</div>

0 commit comments

Comments
 (0)