diff --git a/assets/images/devices/3DRenderVertical.png b/assets/images/devices/3DRenderVertical.png
new file mode 100644
index 0000000000..ad099cc7e3
Binary files /dev/null and b/assets/images/devices/3DRenderVertical.png differ
diff --git a/assets/images/onboarding/stories/slide1.png b/assets/images/onboarding/stories/slide1.png
new file mode 100644
index 0000000000..4ed229821d
Binary files /dev/null and b/assets/images/onboarding/stories/slide1.png differ
diff --git a/assets/images/onboarding/stories/slide2.png b/assets/images/onboarding/stories/slide2.png
new file mode 100644
index 0000000000..291949b715
Binary files /dev/null and b/assets/images/onboarding/stories/slide2.png differ
diff --git a/assets/images/onboarding/stories/slide3.png b/assets/images/onboarding/stories/slide3.png
new file mode 100644
index 0000000000..98fcae5b07
Binary files /dev/null and b/assets/images/onboarding/stories/slide3.png differ
diff --git a/assets/images/onboarding/stories/slide4.png b/assets/images/onboarding/stories/slide4.png
new file mode 100644
index 0000000000..41ede969f1
Binary files /dev/null and b/assets/images/onboarding/stories/slide4.png differ
diff --git a/src/components/RootNavigator/OnboardingNavigator.tsx b/src/components/RootNavigator/OnboardingNavigator.tsx
index c212d859d0..2006538416 100644
--- a/src/components/RootNavigator/OnboardingNavigator.tsx
+++ b/src/components/RootNavigator/OnboardingNavigator.tsx
@@ -39,6 +39,7 @@ import OnboardingSyncDesktopInformation from "../../screens/Onboarding/steps/set
import OnboardingRecoveryPhraseWarning from "../../screens/Onboarding/steps/setupDevice/drawers/RecoveryPhraseWarning";
import PostWelcomeSelection from "../../screens/Onboarding/steps/postWelcomeSelection";
import BuyDeviceScreen from "../../screens/BuyDeviceScreen";
+import OnboardingStepDoYouHaveALedgerDevice from "../../screens/Onboarding/steps/doYouHaveALedger";
const Stack = createStackNavigator();
const OnboardingCarefulWarningStack = createStackNavigator();
@@ -193,6 +194,10 @@ export default function OnboardingNavigator() {
component={OnboardingPreQuizModalNavigator}
options={modalOptions}
/>
+
p.theme.colors.background.main};
- padding: 16px;
`;
-const images = {
- light: [
- require("../../../images/illustration/Light/_069.png"),
- require("../../../images/illustration/Light/_073.png"),
- require("../../../images/illustration/Light/_049.png"),
- ],
- dark: [
- require("../../../images/illustration/Dark/_069.png"),
- require("../../../images/illustration/Dark/_073.png"),
- require("../../../images/illustration/Dark/_049.png"),
- ],
-};
-
-type CardType = { index: number; deviceModelId: DeviceNames };
-const Card = ({ index }: CardType) => {
+const ChildContainer = styled(Flex).attrs({
+ flex: 1,
+})``;
+
+const Item = ({
+ title,
+ imageProps,
+ displayNavigationButtons = false,
+}: {
+ title: string;
+ imageProps: ImageProps;
+ displayNavigationButtons?: boolean;
+}) => {
+ const dispatch = useDispatch();
+ const navigation = useNavigation();
const { t } = useTranslation();
- return (
-
-
-
-
-
- {t(`onboarding.discoverLive.${index}.title`)}
-
-
- {t(`onboarding.discoverLive.${index}.desc`)}
-
-
- );
-};
-const FooterNextButton = ({ label }: { label: string }) => {
- const navigation = useNavigation();
- const dispatch = useDispatch();
- const { resetCurrentStep } = useNavigationInterceptor();
+ const buyLedger = useCallback(() => {
+ // TODO: FIX @react-navigation/native using Typescript
+ // @ts-ignore next-line
+ navigation.navigate(ScreenName.BuyDeviceScreen);
+ }, [navigation]);
- function next(): void {
+ const exploreLedger = useCallback(() => {
dispatch(completeOnboarding());
- resetCurrentStep();
-
- const parentNav = navigation.getParent();
- if (parentNav) {
- parentNav.popToTop();
- }
+ dispatch(setReadOnlyMode(true));
+ // Fixme: Navigate to read only page ?
// TODO: FIX @react-navigation/native using Typescript
// @ts-ignore next-line
- navigation.replace(NavigatorName.Base, {
+ navigation.navigate(NavigatorName.Base, {
screen: NavigatorName.Main,
});
- }
+ }, [navigation]);
return (
-
- );
-};
-
-const FooterActions = new Map();
-FooterActions.set(2, FooterNextButton);
-
-const Footer = ({ index }: { index: number }) => {
- const { t } = useTranslation();
-
- const Component = FooterActions.get(index);
- if (!Component) return null;
-
- return (
-
-
-
+
+
+
+ {title}
+
+
+
+
+ {displayNavigationButtons && (
+
+
+
+
+ )}
+
);
};
function DiscoverLiveInfo() {
- const [currentIndex, setCurrentIndex] = useState(0);
- const navigation = useNavigation();
-
- const handleBack = useCallback(() => navigation.goBack(), [navigation]);
+ const { t } = useTranslation();
return (
-
-
-
-
- {new Array(3).fill(null).map((_, index) => (
-
+ {slidesImages.map((image, index) => (
+
))}
-
-
-
);
}
diff --git a/src/screens/Onboarding/steps/doYouHaveALedger.tsx b/src/screens/Onboarding/steps/doYouHaveALedger.tsx
new file mode 100644
index 0000000000..b1ba0bb0a9
--- /dev/null
+++ b/src/screens/Onboarding/steps/doYouHaveALedger.tsx
@@ -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 (
+
+
+
+
+
+
+
+ {t("onboarding.stepDoYouHaveALedgerDevice.subtitle")}
+
+
+ {t("onboarding.stepDoYouHaveALedgerDevice.title")}
+
+
+
+
+
+ );
+}
+
+export default OnboardingStepDoYouHaveALedgerDevice;
diff --git a/src/screens/Onboarding/steps/postWelcomeSelection.tsx b/src/screens/Onboarding/steps/postWelcomeSelection.tsx
index 659f3b10c2..c496db162a 100644
--- a/src/screens/Onboarding/steps/postWelcomeSelection.tsx
+++ b/src/screens/Onboarding/steps/postWelcomeSelection.tsx
@@ -1,8 +1,7 @@
import React, { useCallback } from "react";
import { useTranslation } from "react-i18next";
-import { useNavigation } from "@react-navigation/native";
+import { RouteProp, useNavigation } from "@react-navigation/native";
import { track, TrackScreen } from "../../../analytics";
-import ChoiceCard from "../../../components/ChoiceCard";
import { ScreenName } from "../../../const";
import OnboardingView from "../OnboardingView";
import StyledStatusBar from "../../../components/StyledStatusBar";
@@ -10,10 +9,16 @@ import Illustration from "../../../images/illustration/Illustration";
import DiscoverCard from "../../Discover/DiscoverCard";
const setupLedgerImg = require("../../../images/illustration/Shared/_SetupLedger.png");
-
const buyNanoImg = require("../../../images/illustration/Shared/_BuyNanoX.png");
+const discoverLiveImg = require("../../../images/illustration/Shared/_DiscoverLive.png");
+
+function PostWelcomeSelection({
+ route,
+}: {
+ route: RouteProp<{ params: { userHasDevice: boolean } }, "params">;
+}) {
+ const { userHasDevice } = route.params;
-function PostWelcomeSelection() {
const navigation = useNavigation();
const { t } = useTranslation();
@@ -25,8 +30,17 @@ function PostWelcomeSelection() {
const buyLedger = useCallback(() => {
track("Onboarding PostWelcome - Buy Ledger");
+ // TODO: FIX @react-navigation/native using Typescript
+ // @ts-ignore next-line
navigation.navigate(ScreenName.BuyDeviceScreen);
- }, []);
+ }, [navigation]);
+
+ const exploreLedger = useCallback(() => {
+ track("Onboarding PostWelcome - Explore Live");
+ // TODO: FIX @react-navigation/native using Typescript
+ // @ts-ignore next-line
+ navigation.navigate(ScreenName.OnboardingModalDiscoverLive);
+ }, [navigation]);
return (
+ {userHasDevice && (
+
+ }
+ />
+ )}
- }
- />
-
}
/>
+ {!userHasDevice && (
+
+ }
+ />
+ )}
);
diff --git a/src/screens/Onboarding/steps/welcome.tsx b/src/screens/Onboarding/steps/welcome.tsx
index e88a08685b..2c5ec274ff 100644
--- a/src/screens/Onboarding/steps/welcome.tsx
+++ b/src/screens/Onboarding/steps/welcome.tsx
@@ -70,7 +70,7 @@ function OnboardingStepWelcome({ navigation }: any) {
// TODO: FIX @react-navigation/native using Typescript
// @ts-ignore next-line
- navigation.navigate({ name: ScreenName.OnboardingPostWelcomeSelection });
+ navigation.navigate({ name: ScreenName.OnboardingDoYouHaveALedgerDevice });
}, [setAccepted, dispatch, navigation]);
const videoMounted = !useIsAppInBackground();