From cddd76aa86748361214816b0c8048f3ddf472c91 Mon Sep 17 00:00:00 2001 From: ismaelsousa Date: Mon, 26 Sep 2022 12:33:52 -0300 Subject: [PATCH] feat: add safeArea to pin code screen --- src/screens/PinLocker/pin.locker.view.tsx | 110 +++++++++++----------- src/screens/PinLocker/styles.ts | 6 +- 2 files changed, 61 insertions(+), 55 deletions(-) diff --git a/src/screens/PinLocker/pin.locker.view.tsx b/src/screens/PinLocker/pin.locker.view.tsx index c714289..bd277dc 100644 --- a/src/screens/PinLocker/pin.locker.view.tsx +++ b/src/screens/PinLocker/pin.locker.view.tsx @@ -5,10 +5,10 @@ import PINCode, { resetPinCodeInternalStates, } from '@haskkor/react-native-pincode'; import {useTheme} from 'styled-components/native'; -import {SkipText, styles} from './styles'; +import {Content, SkipText, styles} from './styles'; import useMyNavigation from '../../common/hooks/useMyNavigation'; import usePinLockerController from './pin.locker.controller'; -import {Alert, View} from 'react-native'; +import {Alert} from 'react-native'; const PinLockerView: React.FC = () => { const {colors} = useTheme(); @@ -46,58 +46,60 @@ const PinLockerView: React.FC = () => { return ( - null} - /> - {pinStatus === 'choose' && ( - - Alert.alert( - '🚧 Are you sure?', - 'This prevents unauthorized access.', - [ - {text: 'cancel'}, - {onPress: setToNotAskToSetPinAgain, text: 'proceed'}, - ], - ) - }> - Skip - - )} + + null} + /> + {pinStatus === 'choose' && ( + + Alert.alert( + '🚧 Are you sure?', + 'This prevents unauthorized access.', + [ + {text: 'cancel'}, + {onPress: setToNotAskToSetPinAgain, text: 'proceed'}, + ], + ) + }> + Skip + + )} + ); }; diff --git a/src/screens/PinLocker/styles.ts b/src/screens/PinLocker/styles.ts index 07b16f3..b19a262 100644 --- a/src/screens/PinLocker/styles.ts +++ b/src/screens/PinLocker/styles.ts @@ -18,5 +18,9 @@ export const SkipText = styled(Text)` align-self: center; padding: 20px; min-height: 14px; - margin-bottom: 50px; + margin-bottom: 20px; +`; + +export const Content = styled.SafeAreaView` + flex: 1; `;