File tree Expand file tree Collapse file tree 3 files changed +18
-21
lines changed Expand file tree Collapse file tree 3 files changed +18
-21
lines changed Original file line number Diff line number Diff line change 11module . exports = {
2- presets : [ " module:metro-react-native-babel-preset" ] ,
2+ presets : [ ' module:metro-react-native-babel-preset' ] ,
33 plugins : [
44 [
5- " module-resolver" ,
5+ ' module-resolver' ,
66 {
77 alias : {
8- " @react-native-community/push-notification-ios" : " ./js"
8+ ' @react-native-community/push-notification-ios' : ' ./js' ,
99 } ,
10- cwd : " babelrc"
11- }
12- ]
13- ]
14- } ;
10+ cwd : ' babelrc' ,
11+ } ,
12+ ] ,
13+ ] ,
14+ } ;
Original file line number Diff line number Diff line change @@ -86,15 +86,13 @@ export default class App extends Component<Props, State> {
8686 label = "Send fake local notification"
8787 />
8888 < Button
89- onPress = { ( ) =>
90- PushNotificationIOS . setApplicationIconBadgeNumber ( 42 )
91- }
92- label = "Set app's icon badge to 42"
93- />
94- < Button
95- onPress = { ( ) => PushNotificationIOS . setApplicationIconBadgeNumber ( 0 ) }
96- label = "Clear app's icon badge"
97- />
89+ onPress = { ( ) => PushNotificationIOS . setApplicationIconBadgeNumber ( 42 ) }
90+ label = "Set app's icon badge to 42"
91+ />
92+ < Button
93+ onPress = { ( ) => PushNotificationIOS . setApplicationIconBadgeNumber ( 0 ) }
94+ label = "Clear app's icon badge"
95+ />
9896 < View >
9997 < Button
10098 onPress = { this . _showPermissions . bind ( this ) }
@@ -122,7 +120,7 @@ export default class App extends Component<Props, State> {
122120 _sendLocalNotification ( ) {
123121 PushNotificationIOS . presentLocalNotification ( {
124122 alertBody : 'Sample local notification' ,
125- applicationIconBadgeNumber : 1
123+ applicationIconBadgeNumber : 1 ,
126124 } ) ;
127125 }
128126
@@ -187,7 +185,6 @@ export default class App extends Component<Props, State> {
187185 }
188186}
189187
190-
191188const styles = StyleSheet . create ( {
192189 container : {
193190 flex : 1 ,
Original file line number Diff line number Diff line change 1010
1111'use strict' ;
1212
13- import { NativeEventEmitter , NativeModules , Platform } from 'react-native' ;
13+ import { NativeEventEmitter , NativeModules } from 'react-native' ;
1414import invariant from 'invariant' ;
1515
16- const { RNCPushNotificationIOS } = NativeModules ;
16+ const { RNCPushNotificationIOS} = NativeModules ;
1717
1818const PushNotificationEmitter = new NativeEventEmitter ( RNCPushNotificationIOS ) ;
1919
You can’t perform that action at this time.
0 commit comments