mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-11-29 11:12:18 +03:00
using translations on sc2 login failure
This commit is contained in:
parent
fdfeb74fc2
commit
abed24b4e8
@ -147,8 +147,9 @@ class LoginContainer extends PureComponent {
|
||||
})
|
||||
.catch((error) => {
|
||||
this.setState({ isLoading: false });
|
||||
Alert.alert('Error', intl.formatMessage({ id: error.message }));
|
||||
// TODO: return
|
||||
Alert.alert(
|
||||
intl.formatMessage({ id: 'alert.fail' }),
|
||||
intl.formatMessage({ id: error.message }));
|
||||
});
|
||||
};
|
||||
|
||||
@ -195,8 +196,8 @@ class LoginContainer extends PureComponent {
|
||||
const errorDescription = err?.response?.data?.error_description
|
||||
? err?.response?.data?.error_description
|
||||
: intl.formatMessage({
|
||||
id: err.message,
|
||||
});
|
||||
id: err.message,
|
||||
});
|
||||
Alert.alert(
|
||||
intl.formatMessage({
|
||||
id: 'login.login_failed',
|
||||
|
@ -65,17 +65,18 @@ class HiveSigner extends PureComponent {
|
||||
});
|
||||
}
|
||||
} else {
|
||||
// TODO: Error alert (Toast Message)
|
||||
throw new Error('alert.unknow_error')
|
||||
}
|
||||
})
|
||||
.catch((error) => {
|
||||
Alert.alert(
|
||||
'Error',
|
||||
// intl.formatMessage({ id:
|
||||
error.message || error.toString(),
|
||||
// }),
|
||||
intl.formatMessage({ id: 'alert.fail' }),
|
||||
intl.formatMessage({
|
||||
id:
|
||||
error.message,
|
||||
}),
|
||||
);
|
||||
// TODO: return
|
||||
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -87,11 +88,10 @@ class HiveSigner extends PureComponent {
|
||||
<StatusBar hidden translucent />
|
||||
<WebView
|
||||
source={{
|
||||
uri: `${hsOptions.base_url}oauth2/authorize?client_id=${
|
||||
hsOptions.client_id
|
||||
}&redirect_uri=${encodeURIComponent(
|
||||
hsOptions.redirect_uri,
|
||||
)}&response_type=code&scope=${encodeURIComponent(hsOptions.scope)}`,
|
||||
uri: `${hsOptions.base_url}oauth2/authorize?client_id=${hsOptions.client_id
|
||||
}&redirect_uri=${encodeURIComponent(
|
||||
hsOptions.redirect_uri,
|
||||
)}&response_type=code&scope=${encodeURIComponent(hsOptions.scope)}`,
|
||||
}}
|
||||
onNavigationStateChange={this._onNavigationStateChange}
|
||||
ref={(ref) => {
|
||||
|
Loading…
Reference in New Issue
Block a user