18c857a0ce
* test(token): added validations for staking page without wallets connected * chore: formatting Co-authored-by: Rado <rado@vegaprotocol.io>
27 lines
614 B
TypeScript
27 lines
614 B
TypeScript
import { Button } from '@vegaprotocol/ui-toolkit';
|
|
import React from 'react';
|
|
import { useTranslation } from 'react-i18next';
|
|
|
|
import {
|
|
AppStateActionType,
|
|
useAppState,
|
|
} from '../../contexts/app-state/app-state-context';
|
|
|
|
export const ConnectToVega = () => {
|
|
const { appDispatch } = useAppState();
|
|
const { t } = useTranslation();
|
|
return (
|
|
<Button
|
|
onClick={() =>
|
|
appDispatch({
|
|
type: AppStateActionType.SET_VEGA_WALLET_OVERLAY,
|
|
isOpen: true,
|
|
})
|
|
}
|
|
data-testid="connect-to-vega-wallet-btn"
|
|
>
|
|
{t('connectVegaWallet')}
|
|
</Button>
|
|
);
|
|
};
|