Skip to content

Commit

Permalink
feat: Navigation screenOptions
Browse files Browse the repository at this point in the history
  • Loading branch information
1uokun committed Feb 26, 2024
1 parent 1c47a1e commit fb69220
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions rn-kitchen-sink/App.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import { NavigationContainer } from '@react-navigation/native'
import { createStackNavigator } from '@react-navigation/stack'
import React from 'react'
import { AppRegistry } from 'react-native'
import { AppRegistry, Platform } from 'react-native'
import 'react-native-gesture-handler'
import Icon from '../components/icon'
import Provider from '../components/provider'
import Theme from './components/Theme'
import RnIndex from './components/index'
Expand Down Expand Up @@ -43,7 +44,15 @@ class App extends React.Component {
return (
<Provider theme={theme}>
<NavigationContainer>
<Stack.Navigator initialRouteName="native">
<Stack.Navigator
initialRouteName="native"
screenOptions={
Platform.OS === 'web'
? {
headerBackImage: () => <Icon name={'arrow-left'} />,
}
: {}
}>
<Stack.Screen
name="native"
component={RnIndex}
Expand Down

0 comments on commit fb69220

Please sign in to comment.