feat(trading): rewards container tweaks (#6037)

This commit is contained in:
m.ray 2024-03-19 14:53:03 +02:00 committed by GitHub
parent e389579537
commit 1fd1013353
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 15 additions and 15 deletions

View File

@ -3,7 +3,6 @@ import {
VegaIcon,
VegaIconNames,
TradingInput,
TinyScroll,
} from '@vegaprotocol/ui-toolkit';
import {
type TransferNode,
@ -120,7 +119,7 @@ export const ActiveRewards = ({ currentEpoch }: { currentEpoch: number }) => {
/>
)}
{/** CARDS */}
<TinyScroll className="grid gap-x-8 gap-y-10 h-fit grid-cols-[repeat(auto-fill,_minmax(230px,_1fr))] md:grid-cols-[repeat(auto-fill,_minmax(230px,_1fr))] lg:grid-cols-[repeat(auto-fill,_minmax(320px,_1fr))] xl:grid-cols-[repeat(auto-fill,_minmax(335px,_1fr))] max-h-[40rem] overflow-auto pr-2">
<div className="grid gap-x-8 gap-y-10 h-fit grid-cols-[repeat(auto-fill,_minmax(230px,_1fr))] md:grid-cols-[repeat(auto-fill,_minmax(230px,_1fr))] lg:grid-cols-[repeat(auto-fill,_minmax(320px,_1fr))] xl:grid-cols-[repeat(auto-fill,_minmax(335px,_1fr))] pr-2">
{data
.filter((n) => applyFilter(n, filter))
.map((node, i) => (
@ -131,7 +130,7 @@ export const ActiveRewards = ({ currentEpoch }: { currentEpoch: number }) => {
requirements={requirements}
/>
))}
</TinyScroll>
</div>
</Card>
);
};

View File

@ -246,6 +246,19 @@ export const RewardsContainer = () => {
})}
</div>
<div className="grid auto-rows-min grid-cols-6 gap-3">
<Card
title={t('Rewards history')}
className="lg:col-span-full hidden md:block"
loading={rewardsLoading}
noBackgroundOnMobile={true}
highlight={true}
>
<RewardsHistoryContainer
epoch={Number(epochData?.epoch.id)}
pubKey={pubKey}
assets={assetMap}
/>
</Card>
{pubKey && activityStreakBenefitTiers.tiers?.length > 0 && (
<Card
title={t('Activity Streak')}
@ -287,18 +300,6 @@ export const RewardsContainer = () => {
</Card>
)}
<ActiveRewards currentEpoch={Number(epochData?.epoch.id)} />
<Card
title={t('Rewards history')}
className="lg:col-span-full hidden md:block"
loading={rewardsLoading}
noBackgroundOnMobile={true}
>
<RewardsHistoryContainer
epoch={Number(epochData?.epoch.id)}
pubKey={pubKey}
assets={assetMap}
/>
</Card>
</div>
</div>
);