Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/examples/src/screens/Animations.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ const NavigateScreen = ({

return (
<View style={{ ...styles.container, backgroundColor: 'pink' }}>
<Button title="Go back" onPress={() => navigation.navigate('Main')} />
<Button title="Go back" onPress={() => navigation.popTo('Main')} />
</View>
);
};
Expand Down
6 changes: 3 additions & 3 deletions apps/test-examples/src/Test1097.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ function Second({ navigation }: { navigation: NavigationProp<ParamListBase> }) {
<ScrollView contentInsetAdjustmentBehavior="automatic">
<Button
title="Tap me for first screen"
onPress={() => navigation.navigate('First')}
onPress={() => navigation.popTo('First')}
/>
<Button
title="Tap me for third screen"
Expand Down Expand Up @@ -165,7 +165,7 @@ function Third({ navigation }: { navigation: NavigationProp<ParamListBase> }) {
keyboardDismissMode="on-drag">
<Button
title="Tap me for the first screen"
onPress={() => navigation.navigate('First')}
onPress={() => navigation.popTo('First')}
/>
<Button
title="Focus search bar"
Expand Down Expand Up @@ -197,7 +197,7 @@ function Third({ navigation }: { navigation: NavigationProp<ParamListBase> }) {
/>
<Button
title="Tap me for the first screen"
onPress={() => navigation.navigate('First')}
onPress={() => navigation.popTo('First')}
/>
<Button
title="Focus search bar"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ function Second({
headerSearchBarOptions: {
autoCapitalize: 'none',
autoFocus: true,
onClose: () => navigation.navigate('First'),
onClose: () => navigation.popTo('First'),
onChangeText: e => setText(e.nativeEvent.text),
barTintColor: text,
},
Expand Down
2 changes: 1 addition & 1 deletion apps/test-examples/src/Test556.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ function Second({ navigation }) {
return (
<Button
title="Tap me for second screen"
onPress={() => navigation.navigate('First')}
onPress={() => navigation.popTo('First')}
/>
);
}
4 changes: 2 additions & 2 deletions apps/test-examples/src/Test624.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ function ThirdScreen({ navigation }) {
<View style={styles.flexOne}>
<TouchableOpacity
style={[styles.centeredContainer, styles.buttonExtras]}
onPress={() => navigation.navigate('Second')}>
onPress={() => navigation.popTo('Second')}>
<Text style={styles.buttonText}>Tap me for second screen</Text>
</TouchableOpacity>
</View>
Expand Down Expand Up @@ -122,7 +122,7 @@ function NestedSecond({ navigation }) {
<View style={styles.centeredContainer}>
<TouchableOpacity
style={[styles.centeredContainer, styles.buttonExtras]}
onPress={() => navigation.navigate('NestedFirst')}>
onPress={() => navigation.popTo('NestedFirst')}>
<Text style={styles.buttonText}>Tap me for second screen</Text>
</TouchableOpacity>
</View>
Expand Down
2 changes: 1 addition & 1 deletion apps/test-examples/src/Test645.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ function DetailsScreen({ navigation }) {
function SettingsScreen({ navigation }) {
return (
<View style={{ flex: 1, alignItems: 'center', justifyContent: 'center' }}>
<Button onPress={() => navigation.navigate('Home')} title="Go to Home" />
<Button onPress={() => navigation.popTo('Main', {screen: 'Home'})} title="Go to Home" />
<Text>Details</Text>
</View>
);
Expand Down
2 changes: 1 addition & 1 deletion apps/test-examples/src/Test648.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ function Second({ navigation }) {
<ScrollView>
<Button
title="Tap me for first screen"
onPress={() => navigation.navigate('First')}
onPress={() => navigation.popTo('First')}
/>
</ScrollView>
);
Expand Down
2 changes: 1 addition & 1 deletion apps/test-examples/src/Test649.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ function Second({ navigation }) {
<ScrollView>
<Button
title="Tap me for first screen"
onPress={() => navigation.navigate('First')}
onPress={() => navigation.popTo('First')}
/>
</ScrollView>
);
Expand Down
2 changes: 1 addition & 1 deletion apps/test-examples/src/Test654.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ function Second({ navigation }) {
return (
<Button
title="Tap me for second screen"
onPress={() => navigation.navigate('First')}
onPress={() => navigation.popTo('First')}
/>
);
}