Skip to content

Commit

Permalink
fix: added missing back buttons to settings pages
Browse files Browse the repository at this point in the history
updated header for biometry, update pin, terms and push notifications screens in the settings stack

Signed-off-by: al-rosenthal <[email protected]>
  • Loading branch information
al-rosenthal committed Jan 10, 2025
1 parent 5b9b85e commit 7f7c64b
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions packages/legacy/core/App/navigators/SettingStack.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import AutoLock from '../screens/AutoLock'
const SettingStack: React.FC = () => {
const Stack = createStackNavigator<SettingStackParams>()
const theme = useTheme()
const [biometryUpdatePending, setBiometryUpdatePending] = useState<boolean>(false)
const { t } = useTranslation()
const [pages, { screen: terms }, UseBiometry, developer, ScreenOptionsDictionary] = useServices([
TOKENS.SCREEN_ONBOARDING_PAGES,
Expand All @@ -38,16 +37,6 @@ const SettingStack: React.FC = () => {
const OnboardingTheme = theme.OnboardingTheme
const carousel = createCarouselStyle(OnboardingTheme)

useEffect(() => {
const handleBiometry = DeviceEventEmitter.addListener(EventTypes.BIOMETRY_UPDATE, (value: boolean) => {
setBiometryUpdatePending(value)
})

return () => {
handleBiometry.remove()
}
}, [])

return (
<Stack.Navigator screenOptions={{ ...defaultStackOptions }}>
<Stack.Screen
Expand Down Expand Up @@ -109,9 +98,9 @@ const SettingStack: React.FC = () => {
component={UseBiometry}
options={{
title: t('Screens.Biometry'),
headerLeft: biometryUpdatePending ? () => null : undefined,
headerBackTestID: testIdWithKey('Back'),
...ScreenOptionsDictionary[Screens.UseBiometry],
headerLeft: undefined,
}}
/>
<Stack.Screen
Expand All @@ -121,6 +110,7 @@ const SettingStack: React.FC = () => {
title: t('Screens.ChangePIN'),
headerBackTestID: testIdWithKey('Back'),
...ScreenOptionsDictionary[Screens.CreatePIN],
headerLeft: undefined,
}}
/>
<Stack.Screen
Expand All @@ -130,6 +120,7 @@ const SettingStack: React.FC = () => {
title: t('Screens.UsePushNotifications'),
headerBackTestID: testIdWithKey('Back'),
...ScreenOptionsDictionary[Screens.UsePushNotifications],
headerLeft: undefined,
}}
/>
<Stack.Screen
Expand All @@ -139,6 +130,7 @@ const SettingStack: React.FC = () => {
title: t('Screens.Terms'),
headerBackTestID: testIdWithKey('Back'),
...ScreenOptionsDictionary[Screens.Terms],
headerLeft: undefined,
}}
/>
<Stack.Screen
Expand Down

0 comments on commit 7f7c64b

Please sign in to comment.