|
1 | 1 | import React, {useCallback, useState} from 'react'; |
2 | 2 | import {View} from 'react-native'; |
| 3 | +import FullPageOfflineBlockingView from '@components/BlockingViews/FullPageOfflineBlockingView'; |
3 | 4 | import Button from '@components/Button'; |
4 | 5 | import HeaderWithBackButton from '@components/HeaderWithBackButton'; |
5 | 6 | import MagicCodeInput from '@components/MagicCodeInput'; |
@@ -97,43 +98,45 @@ function ChangePINPageContent({cardID}: {cardID: string}) { |
97 | 98 | setError(''); |
98 | 99 | }} |
99 | 100 | /> |
100 | | - <View style={[styles.flexGrow1, styles.ph5]}> |
101 | | - <View style={[styles.flex1]}> |
102 | | - <Text style={[styles.textHeadlineH1, styles.mb2]}>{title}</Text> |
103 | | - |
104 | | - <View style={[styles.mv4, styles.ph11]}> |
105 | | - <MagicCodeInput |
106 | | - key={`pin-${isConfirmStep}`} |
107 | | - autoComplete={CONST.AUTO_COMPLETE_VARIANTS.OFF} |
108 | | - name="pin" |
109 | | - value={currentPIN} |
110 | | - maxLength={CONST.EXPENSIFY_CARD.PIN.LENGTH} |
111 | | - onChangeText={handlePINChange} |
112 | | - hasError={!!error} |
113 | | - autoFocus |
114 | | - secureTextEntry={isPINHidden} |
115 | | - /> |
116 | | - {!!error && <Text style={[styles.formError, styles.mt2]}>{error}</Text>} |
| 101 | + <FullPageOfflineBlockingView> |
| 102 | + <View style={[styles.flexGrow1, styles.ph5]}> |
| 103 | + <View style={[styles.flex1]}> |
| 104 | + <Text style={[styles.textHeadlineH1, styles.mb2]}>{title}</Text> |
| 105 | + |
| 106 | + <View style={[styles.mv4, styles.ph11]}> |
| 107 | + <MagicCodeInput |
| 108 | + key={`pin-${isConfirmStep}`} |
| 109 | + autoComplete={CONST.AUTO_COMPLETE_VARIANTS.OFF} |
| 110 | + name="pin" |
| 111 | + value={currentPIN} |
| 112 | + maxLength={CONST.EXPENSIFY_CARD.PIN.LENGTH} |
| 113 | + onChangeText={handlePINChange} |
| 114 | + hasError={!!error} |
| 115 | + autoFocus |
| 116 | + secureTextEntry={isPINHidden} |
| 117 | + /> |
| 118 | + {!!error && <Text style={[styles.formError, styles.mt2]}>{error}</Text>} |
| 119 | + </View> |
| 120 | + |
| 121 | + <View style={[styles.flexRow, styles.justifyContentCenter, styles.mv4, styles.alignItemsCenter, styles.w100]}> |
| 122 | + <Button |
| 123 | + icon={isPINHidden ? icons.Eye : icons.EyeDisabled} |
| 124 | + text={isPINHidden ? translate('cardPage.revealPin') : translate('cardPage.hidePin')} |
| 125 | + onPress={togglePINVisibility} |
| 126 | + medium |
| 127 | + /> |
| 128 | + </View> |
117 | 129 | </View> |
118 | 130 |
|
119 | | - <View style={[styles.flexRow, styles.justifyContentCenter, styles.mv4, styles.alignItemsCenter, styles.w100]}> |
120 | | - <Button |
121 | | - icon={isPINHidden ? icons.Eye : icons.EyeDisabled} |
122 | | - text={isPINHidden ? translate('cardPage.revealPin') : translate('cardPage.hidePin')} |
123 | | - onPress={togglePINVisibility} |
124 | | - medium |
125 | | - /> |
126 | | - </View> |
| 131 | + <Button |
| 132 | + success |
| 133 | + large |
| 134 | + text={isConfirmStep ? translate('common.confirm') : translate('common.next')} |
| 135 | + onPress={handleSubmit} |
| 136 | + style={[styles.mb5]} |
| 137 | + /> |
127 | 138 | </View> |
128 | | - |
129 | | - <Button |
130 | | - success |
131 | | - large |
132 | | - text={isConfirmStep ? translate('common.confirm') : translate('common.next')} |
133 | | - onPress={handleSubmit} |
134 | | - style={[styles.mb5]} |
135 | | - /> |
136 | | - </View> |
| 139 | + </FullPageOfflineBlockingView> |
137 | 140 | </ScreenWrapper> |
138 | 141 | ); |
139 | 142 | } |
|
0 commit comments