Skip to content

Commit

Permalink
feat(trading): rewards container tweaks (#6037)
Browse files Browse the repository at this point in the history
  • Loading branch information
MadalinaRaicu authored Mar 19, 2024
1 parent e389579 commit 1fd1013
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
5 changes: 2 additions & 3 deletions apps/trading/components/rewards-container/active-rewards.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import {
VegaIcon,
VegaIconNames,
TradingInput,
TinyScroll,
} from '@vegaprotocol/ui-toolkit';
import {
type TransferNode,
Expand Down Expand Up @@ -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) => (
Expand All @@ -131,7 +130,7 @@ export const ActiveRewards = ({ currentEpoch }: { currentEpoch: number }) => {
requirements={requirements}
/>
))}
</TinyScroll>
</div>
</Card>
);
};
25 changes: 13 additions & 12 deletions apps/trading/components/rewards-container/rewards-container.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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')}
Expand Down Expand Up @@ -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>
);
Expand Down

0 comments on commit 1fd1013

Please sign in to comment.