2022-03-31 01:08:25 +00:00
|
|
|
import { t } from '@vegaprotocol/react-helpers';
|
2022-03-30 00:01:34 +00:00
|
|
|
import { Splash } from '@vegaprotocol/ui-toolkit';
|
2022-03-27 09:40:27 +00:00
|
|
|
import { useVegaWallet } from '@vegaprotocol/wallet';
|
2022-03-30 00:01:34 +00:00
|
|
|
import { PositionsManager } from './positions-manager';
|
2022-03-25 12:40:08 +00:00
|
|
|
|
2022-03-29 22:52:51 +00:00
|
|
|
export const PositionsContainer = () => {
|
2022-10-03 18:12:34 +00:00
|
|
|
const { pubKey } = useVegaWallet();
|
2022-03-30 00:01:34 +00:00
|
|
|
|
2022-10-03 18:12:34 +00:00
|
|
|
if (!pubKey) {
|
2022-03-30 00:01:34 +00:00
|
|
|
return (
|
|
|
|
<Splash>
|
2022-03-31 01:08:25 +00:00
|
|
|
<p>{t('Please connect Vega wallet')}</p>
|
2022-03-30 00:01:34 +00:00
|
|
|
</Splash>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
2022-10-03 18:12:34 +00:00
|
|
|
return <PositionsManager partyId={pubKey} />;
|
2022-03-25 12:40:08 +00:00
|
|
|
};
|