@@ -23,7 +23,7 @@ export default class StateScreen extends BaseComponent {
23
23
* The image source that's showing at the top. use an image that was required locally
24
24
*/
25
25
imageSource : PropTypes . oneOfType ( [ PropTypes . object , PropTypes . number ] ) ,
26
- source : PropTypes . oneOfType ( [ PropTypes . object , PropTypes . number ] ) ,
26
+ source : PropTypes . oneOfType ( [ PropTypes . object , PropTypes . number ] ) , // TODO: remove after deprecation
27
27
/**
28
28
* To to show as the title
29
29
*/
@@ -54,13 +54,13 @@ export default class StateScreen extends BaseComponent {
54
54
55
55
}
56
56
if ( props . imageSource ) {
57
- LogService . deprecationWarn ( { component : 'StateScreen' , oldProp : 'imageSource ' , newProp : 'source ' } ) ;
57
+ LogService . deprecationWarn ( { component : 'StateScreen' , oldProp : 'source ' , newProp : 'imageSource ' } ) ;
58
58
}
59
59
}
60
60
61
61
generateStyles ( ) {
62
62
const { source, imageSource} = this . props ;
63
- const finalSource = source || imageSource ;
63
+ const finalSource = imageSource || source ;
64
64
65
65
const isRemoteImage = _ . isObject ( finalSource ) && Boolean ( finalSource . uri ) ;
66
66
this . styles = createStyles ( isRemoteImage ) ;
@@ -69,7 +69,7 @@ export default class StateScreen extends BaseComponent {
69
69
render ( ) {
70
70
// TODO: remove testId and imageSource after deprecation
71
71
const { title, subtitle, source, imageSource, ctaLabel, onCtaPress, testId, testID} = this . props ;
72
- const finalSource = source || imageSource ;
72
+ const finalSource = imageSource || source ;
73
73
74
74
return (
75
75
< View style = { this . styles . container } testID = { testID || testId } >
0 commit comments