vega-frontend-monorepo/libs/positions/src/lib/positions-container.tsx

19 lines
472 B
TypeScript
Raw Normal View History

import { t } from '@vegaprotocol/react-helpers';
import { Splash } from '@vegaprotocol/ui-toolkit';
import { useVegaWallet } from '@vegaprotocol/wallet';
import { PositionsManager } from './positions-manager';
2022-03-29 22:52:51 +00:00
export const PositionsContainer = () => {
const { keypair } = useVegaWallet();
if (!keypair) {
return (
<Splash>
<p>{t('Please connect Vega wallet')}</p>
</Splash>
);
}
return <PositionsManager partyId={keypair.pub} />;
};