2022-06-07 09:26:45 +00:00
|
|
|
import { Web3Container } from '../../components/web3-container';
|
2022-03-31 01:08:25 +00:00
|
|
|
import { t } from '@vegaprotocol/react-helpers';
|
2022-06-07 09:26:45 +00:00
|
|
|
import { PositionsContainer } from '@vegaprotocol/positions';
|
|
|
|
import { OrderListContainer } from '@vegaprotocol/order-list';
|
|
|
|
import { AccountsContainer } from '@vegaprotocol/accounts';
|
2022-06-17 14:56:42 +00:00
|
|
|
import { AnchorButton, GridTab, GridTabs } from '@vegaprotocol/ui-toolkit';
|
2022-02-24 00:13:21 +00:00
|
|
|
|
2022-06-07 09:26:45 +00:00
|
|
|
import { WithdrawalsContainer } from './withdrawals/withdrawals-container';
|
|
|
|
|
2022-02-17 05:03:46 +00:00
|
|
|
const Portfolio = () => {
|
2022-06-07 09:26:45 +00:00
|
|
|
const tabClassName = 'p-[16px] pl-[316px]';
|
|
|
|
|
2022-02-17 05:03:46 +00:00
|
|
|
return (
|
2022-06-07 22:08:40 +00:00
|
|
|
<Web3Container>
|
|
|
|
<div className="h-full text-ui">
|
|
|
|
<main className="relative h-[calc(100%-200px)]">
|
|
|
|
<aside className="absolute px-[8px] py-[16px] w-[300px] mt-[28px] h-[calc(100%-28px)] w-[300px] overflow-auto">
|
|
|
|
<h2 className="text-h4 text-black dark:text-white">
|
|
|
|
{t('Filters')}
|
|
|
|
</h2>
|
|
|
|
</aside>
|
2022-06-10 19:00:02 +00:00
|
|
|
<section data-testid="portfolio-grid">
|
2022-06-08 08:47:31 +00:00
|
|
|
<GridTabs>
|
2022-06-07 22:08:40 +00:00
|
|
|
<GridTab id="positions" name={t('Positions')}>
|
|
|
|
<div className={tabClassName}>
|
|
|
|
<h4 className="text-h4 text-black dark:text-white">
|
|
|
|
{t('Positions')}
|
|
|
|
</h4>
|
|
|
|
<PositionsContainer />
|
|
|
|
</div>
|
2022-06-07 09:26:45 +00:00
|
|
|
</GridTab>
|
2022-06-07 22:08:40 +00:00
|
|
|
<GridTab id="orders" name={t('Orders')}>
|
|
|
|
<div className={tabClassName}>
|
|
|
|
<h4 className="text-h4 text-black dark:text-white">
|
|
|
|
{t('Orders')}
|
|
|
|
</h4>
|
|
|
|
<OrderListContainer />
|
|
|
|
</div>
|
2022-06-07 09:26:45 +00:00
|
|
|
</GridTab>
|
2022-06-07 22:08:40 +00:00
|
|
|
<GridTab id="fills" name={t('Fills')}>
|
|
|
|
<div className={tabClassName}>
|
|
|
|
<h4 className="text-h4 text-black dark:text-white">
|
|
|
|
{t('Fills')}
|
|
|
|
</h4>
|
|
|
|
</div>
|
|
|
|
</GridTab>
|
|
|
|
<GridTab id="history" name={t('History')}>
|
|
|
|
<div className={tabClassName}>
|
|
|
|
<h4 className="text-h4 text-black dark:text-white">
|
|
|
|
{t('History')}
|
|
|
|
</h4>
|
|
|
|
</div>
|
2022-06-07 09:26:45 +00:00
|
|
|
</GridTab>
|
|
|
|
</GridTabs>
|
|
|
|
</section>
|
2022-06-07 22:08:40 +00:00
|
|
|
</main>
|
|
|
|
<section className="fixed bottom-0 left-0 w-full h-[200px]">
|
2022-06-08 08:47:31 +00:00
|
|
|
<GridTabs>
|
2022-06-07 22:08:40 +00:00
|
|
|
<GridTab id="collateral" name={t('Collateral')}>
|
|
|
|
<AccountsContainer />
|
|
|
|
</GridTab>
|
|
|
|
<GridTab id="deposits" name={t('Deposits')}>
|
|
|
|
<AnchorButton data-testid="deposit" href="/portfolio/deposit">
|
|
|
|
{t('Deposit')}
|
|
|
|
</AnchorButton>
|
|
|
|
</GridTab>
|
|
|
|
<GridTab id="withdrawals" name={t('Withdrawals')}>
|
|
|
|
<WithdrawalsContainer />
|
|
|
|
</GridTab>
|
|
|
|
</GridTabs>
|
|
|
|
</section>
|
|
|
|
</div>
|
|
|
|
</Web3Container>
|
2022-02-17 05:03:46 +00:00
|
|
|
);
|
|
|
|
};
|
|
|
|
|
2022-04-12 11:04:26 +00:00
|
|
|
Portfolio.getInitialProps = () => ({
|
|
|
|
page: 'portfolio',
|
|
|
|
});
|
|
|
|
|
2022-02-17 05:03:46 +00:00
|
|
|
export default Portfolio;
|