This repository has been archived by the owner on Jun 16, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 113
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
535e5f4
commit 51e42b6
Showing
13 changed files
with
271 additions
and
123 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
import React, { useCallback } from "react"; | ||
import { useTranslation } from "react-i18next"; | ||
import { Box, Flex, Text } from "@ledgerhq/native-ui"; | ||
import { Image } from "react-native"; | ||
import { ScreenName } from "../../../const"; | ||
import StyledStatusBar from "../../../components/StyledStatusBar"; | ||
import Button from "../../../components/wrappedUi/Button"; | ||
|
||
const RenderVertical = require("../../../../assets/images/devices/3DRenderVertical.png"); | ||
|
||
function OnboardingStepDoYouHaveALedgerDevice({ navigation }: any) { | ||
const { t } = useTranslation(); | ||
|
||
const nextHaveALedger = useCallback(() => { | ||
// TODO: FIX @react-navigation/native using Typescript | ||
// @ts-ignore next-line | ||
navigation.navigate({ | ||
name: ScreenName.OnboardingPostWelcomeSelection, | ||
params: { | ||
userHasDevice: true, | ||
}, | ||
}); | ||
}, [navigation]); | ||
|
||
const nextDontHaveALedger = useCallback(() => { | ||
// TODO: FIX @react-navigation/native using Typescript | ||
// @ts-ignore next-line | ||
navigation.navigate({ | ||
name: ScreenName.OnboardingPostWelcomeSelection, | ||
params: { | ||
userHasDevice: false, | ||
}, | ||
}); | ||
}, [navigation]); | ||
|
||
return ( | ||
<Flex flex={1}> | ||
<StyledStatusBar barStyle="light-content" /> | ||
<Box flex={1} justifyContent="center" alignItems="center" mt={8} mx={7}> | ||
<Image | ||
source={RenderVertical} | ||
resizeMode={"contain"} | ||
style={{ flex: 1, width: "100%" }} | ||
/> | ||
</Box> | ||
<Flex px={6} pb={6}> | ||
<Text variant="large" fontWeight="medium" color="neutral.c70" pb={2}> | ||
{t("onboarding.stepDoYouHaveALedgerDevice.subtitle")} | ||
</Text> | ||
<Text variant="h4" color="neutral.c100" pb={8}> | ||
{t("onboarding.stepDoYouHaveALedgerDevice.title")} | ||
</Text> | ||
<Button | ||
type="main" | ||
size="large" | ||
event="Onboarding - Start" | ||
onPress={nextHaveALedger} | ||
mb={6} | ||
> | ||
{t("common.yes")} | ||
</Button> | ||
<Button | ||
type="main" | ||
size="large" | ||
event="Onboarding - Start" | ||
onPress={nextDontHaveALedger} | ||
> | ||
{t("common.no")} | ||
</Button> | ||
</Flex> | ||
</Flex> | ||
); | ||
} | ||
|
||
export default OnboardingStepDoYouHaveALedgerDevice; |
Oops, something went wrong.