vega-frontend-monorepo/apps/token/src/routes/staking/connect-to-vega.tsx
Radosław Szpiech 18c857a0ce
test(token): added validations for staking page without wallets connected (#686)
* test(token): added validations for staking page without wallets connected

* chore: formatting

Co-authored-by: Rado <rado@vegaprotocol.io>
2022-07-01 12:39:20 +02:00

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>
);
};