1+ import { arrayOf , func , string } from 'prop-types' ;
12import React , { Component } from 'react' ;
23import {
4+ findNodeHandle ,
35 requireNativeComponent ,
46 UIManager ,
5- findNodeHandle ,
67 ViewPropTypes ,
78} from 'react-native' ;
8- import { string , func , arrayOf } from 'prop-types' ;
9-
109import { createErrorFromErrorData } from './utils' ;
1110
1211class PublisherBanner extends Component {
13-
1412 constructor ( ) {
1513 super ( ) ;
1614 this . handleSizeChange = this . handleSizeChange . bind ( this ) ;
@@ -29,7 +27,7 @@ class PublisherBanner extends Component {
2927 UIManager . dispatchViewManagerCommand (
3028 findNodeHandle ( this . _bannerView ) ,
3129 UIManager . getViewManagerConfig ( 'RNDFPBannerView' ) . Commands . loadBanner ,
32- null ,
30+ null
3331 ) ;
3432 }
3533
@@ -50,7 +48,9 @@ class PublisherBanner extends Component {
5048
5149 handleAdFailedToLoad ( event ) {
5250 if ( this . props . onAdFailedToLoad ) {
53- this . props . onAdFailedToLoad ( createErrorFromErrorData ( event . nativeEvent . error ) ) ;
51+ this . props . onAdFailedToLoad (
52+ createErrorFromErrorData ( event . nativeEvent . error )
53+ ) ;
5454 }
5555 }
5656
@@ -62,7 +62,7 @@ class PublisherBanner extends Component {
6262 onSizeChange = { this . handleSizeChange }
6363 onAdFailedToLoad = { this . handleAdFailedToLoad }
6464 onAppEvent = { this . handleAppEvent }
65- ref = { el => ( this . _bannerView = el ) }
65+ ref = { ( el ) => ( this . _bannerView = el ) }
6666 />
6767 ) ;
6868 }
@@ -116,6 +116,9 @@ PublisherBanner.propTypes = {
116116 onAppEvent : func ,
117117} ;
118118
119- const RNDFPBannerView = requireNativeComponent ( 'RNDFPBannerView' , PublisherBanner ) ;
119+ const RNDFPBannerView = requireNativeComponent (
120+ 'RNDFPBannerView' ,
121+ PublisherBanner
122+ ) ;
120123
121124export default PublisherBanner ;
0 commit comments