Skip to content

Commit

Permalink
update yml
Browse files Browse the repository at this point in the history
  • Loading branch information
a-novi committed Oct 18, 2023
1 parent 2bfce80 commit 075d4f1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
7 changes: 4 additions & 3 deletions src/components/smart-screen/smart-screen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -163,11 +163,12 @@ class SmartScreenComp extends React.Component<IReduxProps & IExternalProps, ISta
);
}

private renderErrorWidget() {
private renderErrorWidget(error: string) {
return (
<ErrorWidget
header={translate('Widgets.wentWrong')}
body={translate('Widgets.didNotLoad')}
body={error}
// body={translate('Widgets.didNotLoad')}
cta={{
label: translate('App.labels.retry'),
onPress: () => this.props.fetchScreenData(this.props.context)
Expand Down Expand Up @@ -203,7 +204,7 @@ class SmartScreenComp extends React.Component<IReduxProps & IExternalProps, ISta
}

if (screenData.error) {
return this.renderErrorWidget();
return this.renderErrorWidget(screenData.error);
}
}

Expand Down
9 changes: 6 additions & 3 deletions src/screens/smart-screen/smart-screen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -306,11 +306,12 @@ class SmartScreenComponent extends React.Component<
);
}

private renderErrorWidget() {
private renderErrorWidget(error: string) {
return (
<ErrorWidget
header={translate('Widgets.wentWrong')}
body={translate('Widgets.didNotLoad')}
body={error}
// body={translate('Widgets.didNotLoad')}
cta={{
label: translate('App.labels.retry'),
onPress: () => {
Expand Down Expand Up @@ -386,7 +387,9 @@ class SmartScreenComponent extends React.Component<

{/* Display Error (Try again)*/}
{!loadingScreenData && screenData.error && (
<View style={styles.errorContainer}>{this.renderErrorWidget()}</View>
<View style={styles.errorContainer}>
{this.renderErrorWidget(screenData.error)}
</View>
)}
</KeyboardAwareScrollView>
)}
Expand Down

0 comments on commit 075d4f1

Please sign in to comment.