Skip to content

Commit b9b014a

Browse files
committed
feat: show more information
1 parent 118e75c commit b9b014a

File tree

3 files changed

+58
-3
lines changed

3 files changed

+58
-3
lines changed

src/routes/-index/-components/-missions.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,7 @@ export function MissionItem({
175175
src={reward.imageUrl}
176176
className="img-type"
177177
/>
178+
{reward.quantity > 1 ? `${reward.quantity}x` : ''}
178179
</div>
179180
))}
180181
</div>

src/routes/-index/-home/endgame-ventures.tsx

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import {
88
MissionItem,
99
MissionsContainer,
1010
Modifiers,
11+
SchematicRarity,
1112
} from '../-components/-missions'
1213
import { TitleSection } from '../-components/-title'
1314

@@ -37,6 +38,52 @@ export function EndgameVenturesSection({
3738
key={mission.raw.mission.missionGuid}
3839
>
3940
<>
41+
{mission.ui.alert.rewards.length > 0 && (
42+
<>
43+
{mission.ui.alert.rewards
44+
.map((reward) => {
45+
if (
46+
reward.itemId.includes('eventscaling') ||
47+
reward.itemId.includes(
48+
'campaign_event_currency'
49+
) ||
50+
reward.itemId.includes('phoenixxp')
51+
) {
52+
return null
53+
}
54+
55+
return (
56+
<span
57+
className={cn(
58+
'flex flex-shrink-0 items-center rounded',
59+
{
60+
'border px-1': reward.type === 'trap',
61+
}
62+
)}
63+
key={reward.itemId}
64+
>
65+
<img
66+
src={reward.imageUrl}
67+
className="img-type"
68+
/>
69+
<SchematicRarity
70+
reward={reward}
71+
preview
72+
/>
73+
</span>
74+
)
75+
})
76+
.slice(0, 3)}{' '}
77+
{mission.ui.mission.rewards.filter(
78+
(reward) =>
79+
!reward.itemId.includes('eventscaling') ||
80+
reward.itemId.includes(
81+
'campaign_event_currency'
82+
) ||
83+
reward.itemId.includes('phoenixxp')
84+
).length > 0 && '•'}
85+
</>
86+
)}
4087
{mission.ui.mission.rewards
4188
.map((reward) => {
4289
if (

src/routes/-index/-home/uncommon-perk-up.tsx

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ export function UncommonPerkUpSection({
2020
}) {
2121
const { t } = useTranslation(['alerts'])
2222

23+
// console.log('data ->', data)
24+
2325
return (
2426
<section aria-labelledby="title-uncommon-perks">
2527
<TitleSection
@@ -50,6 +52,13 @@ export function UncommonPerkUpSection({
5052
return null
5153
}
5254

55+
const quantity =
56+
baseReward.quantity > 1
57+
? (baseReward as any).isBad !== undefined
58+
? `${numberWithCommaSeparator(baseReward.quantity)}x`
59+
: numberWithCommaSeparator(baseReward.quantity)
60+
: null
61+
5362
return (
5463
<MissionItem
5564
data={mission}
@@ -60,9 +69,7 @@ export function UncommonPerkUpSection({
6069
src={baseReward.imageUrl}
6170
className="img-type"
6271
/>
63-
{baseReward.quantity > 1
64-
? numberWithCommaSeparator(baseReward.quantity)
65-
: null}
72+
{quantity}
6673
<Modifiers data={mission.ui.mission.modifiers} />
6774
</>
6875
</MissionItem>

0 commit comments

Comments
 (0)