We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 19b59c6 commit c645ab8Copy full SHA for c645ab8
examples/SampleApp/src/components/ScreenHeader.tsx
@@ -64,16 +64,18 @@ export const BackButton: React.FC<{
64
return (
65
<TouchableOpacity
66
onPress={() => {
67
+ if (onBack) {
68
+ onBack();
69
+ return;
70
+ }
71
+
72
if (!navigation.canGoBack()) {
73
// if no previous screen was present in history, go to the list screen
74
// this can happen when opened through push notification
75
navigation.reset({ index: 0, routes: [{ name: 'HomeScreen' }] });
76
} else {
77
navigation.goBack();
78
}
- if (onBack) {
- onBack();
- }
79
}}
80
style={styles.backButton}
81
>
0 commit comments