Meriadec Pillet
7 years ago
committed by
GitHub
4 changed files with 170 additions and 124 deletions
@ -0,0 +1,57 @@ |
|||
// @flow
|
|||
|
|||
import React, { Fragment } from 'react' |
|||
import { i } from 'helpers/staticPath' |
|||
|
|||
import type { T } from 'types/common' |
|||
|
|||
import Box from 'components/base/Box' |
|||
import Button from 'components/base/Button' |
|||
|
|||
import { Title, Description, OnboardingFooterWrapper } from '../../helperComponents' |
|||
|
|||
export function GenuineCheckErrorPage({ |
|||
redoGenuineCheck, |
|||
contactSupport, |
|||
isLedgerNano, |
|||
t, |
|||
}: { |
|||
redoGenuineCheck: () => void, |
|||
contactSupport: () => void, |
|||
isLedgerNano: boolean | null, |
|||
t: T, |
|||
}) { |
|||
return ( |
|||
<Box sticky pt={50}> |
|||
<Box grow alignItems="center" justifyContent="center"> |
|||
{isLedgerNano ? ( |
|||
<Fragment> |
|||
<Title>{t('onboarding:genuineCheck.errorPage.ledgerNano.title')}</Title> |
|||
<Description>{t('onboarding:genuineCheck.errorPage.ledgerNano.desc')}</Description> |
|||
<Box mt={5} mr={7}> |
|||
<img alt="" src={i('nano-error-onb.svg')} /> |
|||
</Box> |
|||
</Fragment> |
|||
) : ( |
|||
<Fragment> |
|||
<Title>{t('onboarding:genuineCheck.errorPage.ledgerBlue.title')}</Title> |
|||
<Description pb={5}> |
|||
{t('onboarding:genuineCheck.errorPage.ledgerBlue.desc')} |
|||
</Description> |
|||
<Box alignItems="center"> |
|||
<img alt="" src={i('blue-error-onb.svg')} /> |
|||
</Box> |
|||
</Fragment> |
|||
)} |
|||
</Box> |
|||
<OnboardingFooterWrapper> |
|||
<Button padded outlineGrey onClick={() => redoGenuineCheck()}> |
|||
{t('app:common.back')} |
|||
</Button> |
|||
<Button padded danger onClick={() => contactSupport()} ml="auto"> |
|||
{t('onboarding:genuineCheck.buttons.contactSupport')} |
|||
</Button> |
|||
</OnboardingFooterWrapper> |
|||
</Box> |
|||
) |
|||
} |
@ -0,0 +1,67 @@ |
|||
// @flow
|
|||
|
|||
import React from 'react' |
|||
import { colors } from 'styles/theme' |
|||
|
|||
import type { T } from 'types/common' |
|||
import type { OnboardingState } from 'reducers/onboarding' |
|||
|
|||
import FakeLink from 'components/base/FakeLink' |
|||
import IconCross from 'icons/Cross' |
|||
import Box from 'components/base/Box' |
|||
import Button from 'components/base/Button' |
|||
import TranslatedError from 'components/TranslatedError' |
|||
|
|||
import { OnboardingFooterWrapper } from '../../helperComponents' |
|||
|
|||
export function GenuineCheckUnavailableFooter({ |
|||
prevStep, |
|||
nextStep, |
|||
t, |
|||
}: { |
|||
prevStep: () => void, |
|||
nextStep: () => void, |
|||
t: T, |
|||
}) { |
|||
return ( |
|||
<OnboardingFooterWrapper> |
|||
<Button padded outlineGrey onClick={() => prevStep()}> |
|||
{t('app:common.back')} |
|||
</Button> |
|||
<Box horizontal ml="auto"> |
|||
<Button padded disabled={false} onClick={() => nextStep()} mx={2}> |
|||
{t('app:common.skipThisStep')} |
|||
</Button> |
|||
<Button padded onClick={nextStep} disabled primary> |
|||
{t('app:common.continue')} |
|||
</Button> |
|||
</Box> |
|||
</OnboardingFooterWrapper> |
|||
) |
|||
} |
|||
|
|||
export function GenuineCheckUnavailableMessage({ |
|||
handleOpenGenuineCheckModal, |
|||
onboarding, |
|||
t, |
|||
}: { |
|||
handleOpenGenuineCheckModal: () => void, |
|||
t: T, |
|||
onboarding: OnboardingState, |
|||
}) { |
|||
return ( |
|||
<Box align="center" flow={1} color={colors.alertRed}> |
|||
<FakeLink ff="Open Sans|Regular" fontSize={4} underline onClick={handleOpenGenuineCheckModal}> |
|||
{t('app:common.retry')} |
|||
</FakeLink> |
|||
<Box horizontal justify="center"> |
|||
<Box justifyContent="center"> |
|||
<IconCross size={12} /> |
|||
</Box> |
|||
<Box ff="Open Sans|Regular" style={{ maxWidth: 150 }} fontSize={2} ml={1}> |
|||
<TranslatedError error={onboarding.genuine.genuineCheckUnavailable} /> |
|||
</Box> |
|||
</Box> |
|||
</Box> |
|||
) |
|||
} |
Loading…
Reference in new issue