feat: added rewards

This commit is contained in:
TresAbhi committed 2023-07-16 18:15:34 +00:00
1 parent b4ae39a509
commit c72bfa9f71
2 files changed
+46 -8

No files matched your search

+32 -1
View File
@@ -6,7 +6,7 @@ export interface ItemProps {
deltaPosition?: number;
points: number;
deltaPoints?: number;
reward: RatingsReward;
reward?: RatingsReward;
nickname: string;
clan?: string;
}
@@ -99,6 +99,37 @@ export function Item({
</span>
</div>
)}
<div
style={{
flex: 1,
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
gap: 4,
}}
>
{reward && (
<img
style={{ width: 16, height: 16 }}
src={
reward.type === 'vehicle'
? reward.vehicle.image_url
: reward.stuff.image_url
}
/>
)}
{reward?.type === 'stuff' && (
<span
style={{
color: theme.colors.textLowContrast,
fontSize: 16,
}}
>
x {reward.count}
</span>
)}
</div>
</div>
);
}