All files / app/pages/onboarding/02-welcome welcome.tsx

0% Statements 0/13
100% Branches 0/0
0% Functions 0/3
0% Lines 0/12

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37                                                                         
import {
  Onboarding,
  OnboardingTitle,
  OnboardingButton,
  OnboardingText,
} from '@components/onboarding';
import routes from '@constants/routes.json';
import { useBackButton } from '@hooks/use-back-url';
import { OnboardingSelector } from 'app/tests/features/onboarding.selectors';
import React from 'react';
import { useHistory } from 'react-router-dom';
 
export const Welcome: React.FC = () => {
  const history = useHistory();
  useBackButton(routes.REQUEST_DIAGNOSTICS);
 
  return (
    <Onboarding>
      <OnboardingTitle>Leather</OnboardingTitle>
      <OnboardingText>
        Manage your STX holdings, and earn Bitcoin by participating in Stacking
      </OnboardingText>
      <OnboardingButton mt="extra-loose" onClick={() => history.push(routes.CREATE)}>
        Create a new wallet
      </OnboardingButton>
      <OnboardingButton
        onClick={() => history.push(routes.RESTORE)}
        mt="base"
        mode="secondary"
        data-test={OnboardingSelector.BtnRestoreWallet}
      >
        I already have a wallet
      </OnboardingButton>
    </Onboarding>
  );
};