This repository was archived by the owner on Feb 25, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -128,7 +128,7 @@ export type SceneDescriptorMap = { [key: string]: SceneDescriptor | undefined };
128128
129129export type HeaderBackButtonProps = {
130130 disabled ?: boolean ;
131- onPress : ( ) => void ;
131+ onPress ? : ( ) => void ;
132132 pressColorAndroid ?: string ;
133133 backImage ?: ( props : { tintColor : string } ) => React . ReactNode ;
134134 tintColor ?: string ;
Original file line number Diff line number Diff line change @@ -141,9 +141,9 @@ export default class HeaderSegment extends React.Component<Props, State> {
141141 leftLabel : previousTitle ,
142142 onGoBack,
143143 headerTitle,
144- headerLeft : left = ( props : HeaderBackButtonProps ) => (
145- < HeaderBackButton { ...props } />
146- ) ,
144+ headerLeft : left = onGoBack
145+ ? ( props : HeaderBackButtonProps ) => < HeaderBackButton { ...props } />
146+ : undefined ,
147147 // @ts -ignore
148148 headerStatusBarHeight = getStatusBarHeight ( layout . width > layout . height ) ,
149149 headerTransparent,
@@ -295,7 +295,7 @@ export default class HeaderSegment extends React.Component<Props, State> {
295295 style = { { height : headerStatusBarHeight } }
296296 />
297297 < View pointerEvents = "box-none" style = { styles . content } >
298- { onGoBack ? (
298+ { left ? (
299299 < Animated . View
300300 pointerEvents = "box-none"
301301 style = { [ styles . left , leftButtonStyle , leftContainerStyle ] }
You can’t perform that action at this time.
0 commit comments