From 6859de7ded8d296da2966d81c26d007499ffab85 Mon Sep 17 00:00:00 2001 From: banklesss <105349292+banklesss@users.noreply.github.com> Date: Wed, 8 May 2024 17:41:06 +0200 Subject: [PATCH] fix(setup-wallet): info icon alignment (#3247) --- .../CreateWallet/RecoveryPhraseScreen.tsx | 99 +++++++------------ 1 file changed, 38 insertions(+), 61 deletions(-) diff --git a/apps/wallet-mobile/src/features/SetupWallet/useCases/CreateWallet/RecoveryPhraseScreen.tsx b/apps/wallet-mobile/src/features/SetupWallet/useCases/CreateWallet/RecoveryPhraseScreen.tsx index f1f4edbf04..bed942361a 100644 --- a/apps/wallet-mobile/src/features/SetupWallet/useCases/CreateWallet/RecoveryPhraseScreen.tsx +++ b/apps/wallet-mobile/src/features/SetupWallet/useCases/CreateWallet/RecoveryPhraseScreen.tsx @@ -3,20 +3,11 @@ import {useSetupWallet} from '@yoroi/setup-wallet' import {useTheme} from '@yoroi/theme' import {BlurView} from 'expo-blur' import * as React from 'react' -import { - Linking, - Platform, - ScrollView, - StyleSheet, - Text, - TouchableOpacity, - useWindowDimensions, - View, -} from 'react-native' +import {Linking, Platform, StyleSheet, Text, TouchableOpacity, View} from 'react-native' import LinearGradient from 'react-native-linear-gradient' import {SafeAreaView} from 'react-native-safe-area-context' -import {Button, useModal} from '../../../../components' +import {Button, Spacer, useModal} from '../../../../components' import {Space} from '../../../../components/Space/Space' import {useMetrics} from '../../../../metrics/metricsManager' import {WalletInitRouteNavigation} from '../../../../navigation' @@ -30,19 +21,8 @@ import {EyeClosed as EyeClosedIllustration} from '../../illustrations/EyeClosed' import {EyeOpen as EyeOpenIllustration} from '../../illustrations/EyeOpen' import {Info as InfoIcon} from '../../illustrations/Info' -const useSizeModal = () => { - const HEIGHT_SCREEN = useWindowDimensions().height - const mediumScreenHeight = 800 - const largerScreenHeight = 900 - const PERCENTAGE = HEIGHT_SCREEN >= largerScreenHeight ? 48 : HEIGHT_SCREEN >= mediumScreenHeight ? 55 : 75 - const HEIGHT_MODAL = (HEIGHT_SCREEN / 100) * PERCENTAGE - - return {HEIGHT_MODAL} as const -} - export const RecoveryPhraseScreen = () => { const {styles, colors} = useStyles() - const {HEIGHT_MODAL} = useSizeModal() const {openModal, closeModal} = useModal() const [isBlur, setIsBlur] = React.useState(true) const navigation = useNavigation() @@ -63,28 +43,26 @@ export const RecoveryPhraseScreen = () => { openModal( strings.recoveryPhraseModalTitle, - - - + - { - Linking.openURL(YoroiZendeskLink) - }} - /> - - + - + { + Linking.openURL(YoroiZendeskLink) + }} + /> + +