Skip to content

Commit 206ed14

Browse files
authored
Merge pull request #1162 from StoDevX/settings-button-rn-take2
Add settings to left button in new nav
2 parents b8e5d9f + 3d4d45d commit 206ed14

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

source/views/components/nav-buttons/open-settings.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export function OpenSettingsButton({
2222
borderless
2323
highlight={false}
2424
style={[styles.button, buttonStyle]}
25-
onPress={() => navigation.push('SettingsView')}
25+
onPress={() => navigation.navigate('SettingsView')}
2626
>
2727
<Icon style={styles.icon} name="ios-settings" />
2828
</Touchable>

source/views/home/home.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import type {ViewType} from '../views'
1515
import {allViews} from '../views'
1616
import {HomeScreenButton, CELL_MARGIN} from './button'
1717
import {trackedOpenUrl} from '../components/open-url'
18-
import {EditHomeButton} from '../components/nav-buttons'
18+
import {EditHomeButton, OpenSettingsButton} from '../components/nav-buttons'
1919

2020
function HomePage({
2121
navigation,
@@ -54,6 +54,7 @@ HomePage.navigationOptions = ({navigation}) => {
5454
return {
5555
title: 'All About Olaf',
5656
headerBackTitle: 'Home',
57+
headerLeft: <OpenSettingsButton navigation={navigation} />,
5758
headerRight: <EditHomeButton navigation={navigation} />,
5859
}
5960
}

0 commit comments

Comments
 (0)