Skip to content

Fix/ StateScreen source deprecation #1329

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 3, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions demo/src/screens/componentScreens/EmptyStateScreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,15 @@ export default class EmptyStateScreen extends Component {
title='Oppsie (with local image)'
subtitle='Nothing to see here..'
ctaLabel='OK'
source={localImageSource}
imageSource={localImageSource}
/>
</View>
<View style={styles.pageView}>
<StateScreen
title='Oppsie (with remote image)'
subtitle='Nothing to see here..'
ctaLabel='OK'
source={remoteImageSource}
imageSource={remoteImageSource}
/>
</View>
</ScrollView>
Expand Down
4 changes: 2 additions & 2 deletions src/components/stateScreen/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export default class StateScreen extends BaseComponent {
LogService.deprecationWarn({component: 'StateScreen', oldProp: 'testId', newProp: 'testID'});

}
if (props.imageSource) {
if (props.source) {
LogService.deprecationWarn({component: 'StateScreen', oldProp: 'source', newProp: 'imageSource'});
}
}
Expand All @@ -67,7 +67,7 @@ export default class StateScreen extends BaseComponent {
}

render() {
// TODO: remove testId and imageSource after deprecation
// TODO: remove testId and source after deprecation
const {title, subtitle, source, imageSource, ctaLabel, onCtaPress, testId, testID} = this.props;
const finalSource = imageSource || source;

Expand Down