vega-frontend-monorepo/apps/trading/components/viewing-banner/index.tsx
Matthew Russell 28b4593a1d
refactor(trading,governance,wallet): wallet rewrite (#5815)
Co-authored-by: bwallacee <ben@vega.xyz>
2024-03-01 14:25:56 +00:00

10 lines
323 B
TypeScript

import { ViewingAsBanner } from '@vegaprotocol/ui-toolkit';
import { useVegaWallet } from '@vegaprotocol/wallet-react';
export const ViewingBanner = () => {
const { isReadOnly, pubKey, disconnect } = useVegaWallet();
return isReadOnly ? (
<ViewingAsBanner pubKey={pubKey} disconnect={disconnect} />
) : null;
};