11import React from 'react' ;
2- import { withNavigation } from 'react-navigation' ;
2+ import { withNavigation } from '@ react-navigation/compat ' ;
33import { TouchableOpacity , StyleSheet , Platform , Dimensions } from 'react-native' ;
44import { Button , Block , NavBar , Text , theme , Button as GaButton } from 'galio-framework' ;
55
@@ -47,7 +47,7 @@ class Header extends React.Component {
4747 } ;
4848 renderRight = ( ) => {
4949 const { white, title, navigation } = this . props ;
50- const { routeName } = navigation . state ;
50+
5151
5252 if ( title === 'Title' ) {
5353 return [
@@ -56,7 +56,7 @@ class Header extends React.Component {
5656 ] ;
5757 }
5858
59- switch ( routeName ) {
59+ switch ( title ) {
6060 case 'Home' :
6161 return [
6262 < BellButton key = "chat-home" navigation = { navigation } isWhite = { white } /> ,
@@ -201,8 +201,8 @@ class Header extends React.Component {
201201 navigation,
202202 ...props
203203 } = this . props ;
204- const { routeName } = navigation . state ;
205- const noShadow = [ 'Search' , 'Categories' , 'Deals' , 'Pro' , 'Profile' ] . includes ( routeName ) ;
204+
205+ const noShadow = [ 'Search' , 'Categories' , 'Deals' , 'Pro' , 'Profile' ] . includes ( title ) ;
206206 const headerStyles = [
207207 ! noShadow ? styles . shadow : null ,
208208 transparent ? { backgroundColor : 'rgba(0,0,0,0)' } : null
@@ -213,6 +213,7 @@ class Header extends React.Component {
213213 return (
214214 < Block style = { headerStyles } >
215215 < NavBar
216+ back = { false }
216217 title = { title }
217218 style = { navbarStyles }
218219 transparent = { transparent }
@@ -224,7 +225,7 @@ class Header extends React.Component {
224225 family = "NowExtra"
225226 size = { 16 }
226227 onPress = { this . handleLeftPress }
227- color = { iconColor || nowTheme . COLORS . ICON }
228+ color = { iconColor || ( white ? nowTheme . COLORS . WHITE : nowTheme . COLORS . ICON ) }
228229 />
229230 }
230231 leftStyle = { { paddingVertical : 12 , flex : 0.2 } }
0 commit comments