33import React , { PureComponent } from 'react' ;
44import { View } from 'react-native' ;
55
6- import type { Dispatch , LocalizableText } from '../types' ;
6+ import NavigationService from './NavigationService' ;
7+ import type { LocalizableText } from '../types' ;
78import type { ThemeData } from '../styles' ;
89import styles , { ThemeContext , NAVBAR_SIZE } from '../styles' ;
9- import { connect } from '../react-redux' ;
1010
1111import Label from '../common/Label' ;
1212import NavButton from './NavButton' ;
1313import { navigateBack } from '../actions' ;
1414
1515type Props = $ReadOnly < { |
16- dispatch : Dispatch ,
1716 canGoBack : boolean ,
1817 title : LocalizableText ,
1918| } > ;
@@ -23,7 +22,7 @@ class ModalNavBar extends PureComponent<Props> {
2322 context : ThemeData ;
2423
2524 render ( ) {
26- const { dispatch , canGoBack, title } = this . props ;
25+ const { canGoBack, title } = this . props ;
2726 const textStyle = [
2827 styles . navTitle ,
2928 canGoBack ? { marginRight : NAVBAR_SIZE } : { marginLeft : 16 } ,
@@ -46,7 +45,7 @@ class ModalNavBar extends PureComponent<Props> {
4645 < NavButton
4746 name = "arrow-left"
4847 onPress = { ( ) => {
49- dispatch ( navigateBack ( ) ) ;
48+ NavigationService . dispatch ( navigateBack ( ) ) ;
5049 } }
5150 />
5251 ) }
@@ -58,4 +57,4 @@ class ModalNavBar extends PureComponent<Props> {
5857 }
5958}
6059
61- export default connect < { || } , _ , _ > ( ) ( ModalNavBar ) ;
60+ export default ModalNavBar ;
0 commit comments