diff --git a/apps/trading/client-pages/portfolio/portfolio.tsx b/apps/trading/client-pages/portfolio/portfolio.tsx index dbe2b4f3a..854981fc8 100644 --- a/apps/trading/client-pages/portfolio/portfolio.tsx +++ b/apps/trading/client-pages/portfolio/portfolio.tsx @@ -15,7 +15,6 @@ import { PositionsMenu } from '../../components/positions-menu'; import { WithdrawalsContainer } from '../../components/withdrawals-container'; import { OrdersContainer } from '../../components/orders-container'; import { LedgerContainer } from '../../components/ledger-container'; -import { RewardsContainer } from '../../components/rewards-container'; import { ResizableGrid, ResizableGridPanel, @@ -86,9 +85,6 @@ export const Portfolio = () => { - - - diff --git a/apps/trading/client-pages/rewards/index.ts b/apps/trading/client-pages/rewards/index.ts new file mode 100644 index 000000000..b41d3a1d5 --- /dev/null +++ b/apps/trading/client-pages/rewards/index.ts @@ -0,0 +1 @@ +export { Rewards } from './rewards'; diff --git a/apps/trading/client-pages/rewards/rewards.tsx b/apps/trading/client-pages/rewards/rewards.tsx new file mode 100644 index 000000000..57e08063e --- /dev/null +++ b/apps/trading/client-pages/rewards/rewards.tsx @@ -0,0 +1,11 @@ +import { t } from '@vegaprotocol/i18n'; +import { RewardsContainer } from '../../components/rewards-container'; + +export const Rewards = () => { + return ( +
+

{t('Rewards')}

+ +
+ ); +}; diff --git a/apps/trading/components/navbar/navbar.tsx b/apps/trading/components/navbar/navbar.tsx index 72644837d..cb58ec5f5 100644 --- a/apps/trading/components/navbar/navbar.tsx +++ b/apps/trading/components/navbar/navbar.tsx @@ -192,6 +192,11 @@ const NavbarMenu = ({ onClick }: { onClick: () => void }) => { {t('Fees')} + + + {t('Rewards')} + + {t('Governance')} diff --git a/apps/trading/components/rewards-container/rewards-container.tsx b/apps/trading/components/rewards-container/rewards-container.tsx index 255b13d8e..bae86ab63 100644 --- a/apps/trading/components/rewards-container/rewards-container.tsx +++ b/apps/trading/components/rewards-container/rewards-container.tsx @@ -84,54 +84,52 @@ export const RewardsContainer = () => { // TODO: Fix grid rows, they break on small screens when things stack return ( -
-

Rewards

-
- {/* Always show the rewards pot for the reward asset AKA Vega */} - - - - {/* Show all other rewards */} - {Object.keys(rewardAssetsMap).map((assetId) => { - const asset = rewardAssetsMap[assetId][0].asset; - return ( - - - - ); - })} - - - - - - - {/* +
+ {/* Always show the rewards pot for the reward asset AKA Vega */} + + + + {/* Show all other rewards */} + {Object.keys(rewardAssetsMap).map((assetId) => { + const asset = rewardAssetsMap[assetId][0].asset; + return ( + + + + ); + })} + + + + + + + {/* TODO: @@ -139,17 +137,16 @@ export const RewardsContainer = () => { TODO: */} - - - -
+ + +
); }; @@ -348,7 +345,7 @@ interface RewardRow { total: number; } -const RewardHistory = ({ +export const RewardHistory = ({ epochRewardSummaries, assets, }: { diff --git a/apps/trading/lib/links.ts b/apps/trading/lib/links.ts index f48128ec3..16f05519e 100644 --- a/apps/trading/lib/links.ts +++ b/apps/trading/lib/links.ts @@ -18,6 +18,7 @@ export const Routes = { REFERRALS_CREATE_CODE: '/referrals/create-code', TEAMS: '/teams', FEES: '/fees', + REWARDS: '/rewards', } as const; type ConsoleLinks = { @@ -42,4 +43,5 @@ export const Links: ConsoleLinks = { REFERRALS_CREATE_CODE: () => Routes.REFERRALS_CREATE_CODE, TEAMS: () => Routes.TEAMS, FEES: () => Routes.FEES, + REWARDS: () => Routes.REWARDS, }; diff --git a/apps/trading/pages/client-router.tsx b/apps/trading/pages/client-router.tsx index 52254d5d2..c3505274f 100644 --- a/apps/trading/pages/client-router.tsx +++ b/apps/trading/pages/client-router.tsx @@ -14,6 +14,7 @@ import { Deposit } from '../client-pages/deposit'; import { Withdraw } from '../client-pages/withdraw'; import { Transfer } from '../client-pages/transfer'; import { Fees } from '../client-pages/fees'; +import { Rewards } from '../client-pages/rewards'; import { Routes as AppRoutes } from '../lib/links'; import { LayoutWithSky } from '../client-pages/referrals/layout'; import { Referrals } from '../client-pages/referrals/referrals'; @@ -96,6 +97,16 @@ export const routerConfig: RouteObject[] = compact([ }, ], }, + { + path: 'rewards/*', + element: } />, + children: [ + { + index: true, + element: , + }, + ], + }, { path: 'markets/*', element: (