Skip to content

Commit 8e1cdd8

Browse files
authored
Merge pull request Expensify#87181 from Expensify/chuckdries/change-pin-offline
[No QA] Wrap ChangePINPage in FullPageOfflineBlockingView
2 parents 8f90afa + eed478b commit 8e1cdd8

1 file changed

Lines changed: 37 additions & 34 deletions

File tree

src/pages/settings/Wallet/ExpensifyCardPage/ChangePINPage.tsx

Lines changed: 37 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import React, {useCallback, useState} from 'react';
22
import {View} from 'react-native';
3+
import FullPageOfflineBlockingView from '@components/BlockingViews/FullPageOfflineBlockingView';
34
import Button from '@components/Button';
45
import HeaderWithBackButton from '@components/HeaderWithBackButton';
56
import MagicCodeInput from '@components/MagicCodeInput';
@@ -97,43 +98,45 @@ function ChangePINPageContent({cardID}: {cardID: string}) {
9798
setError('');
9899
}}
99100
/>
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>
117129
</View>
118130

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+
/>
127138
</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>
137140
</ScreenWrapper>
138141
);
139142
}

0 commit comments

Comments
 (0)