@basiq/connect-auth 0.1.86 → 0.1.87

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,3 +1,3 @@
1
1
  /// <reference types="react" />
2
- import './locales/i18n';
2
+ import '../locales/i18n';
3
3
  export declare function BasiqConnect(): JSX.Element;
@@ -948,7 +948,7 @@ var authUser = /*#__PURE__*/function () {
948
948
  return _context2.abrupt("return", {
949
949
  headers: result.headers,
950
950
  statusCode: result.status,
951
- error: _json.message || result.statusText || 'Something went wrong',
951
+ error: (_json == null ? void 0 : _json.message) || result.statusText || 'Something went wrong',
952
952
  ok: false
953
953
  });
954
954
 
@@ -1017,7 +1017,8 @@ function StartScreen(props) {
1017
1017
  var onContinue = props.onContinue,
1018
1018
  appName = props.appName,
1019
1019
  shadow = props.shadow,
1020
- authId = props.authId;
1020
+ authId = props.authId,
1021
+ showErrorScreen = props.showErrorScreen;
1021
1022
 
1022
1023
  var _useState = React.useState(false),
1023
1024
  loading = _useState[0],
@@ -1047,9 +1048,11 @@ function StartScreen(props) {
1047
1048
  case 4:
1048
1049
  response = _context.sent;
1049
1050
 
1050
- if ((response == null ? void 0 : (_response$data = response.data) == null ? void 0 : _response$data.status) === 'code-sent') {
1051
+ if (response != null && (_response$data = response.data) != null && _response$data.ok) {
1051
1052
  setLoading(false);
1052
1053
  onContinue();
1054
+ } else {
1055
+ showErrorScreen(response == null ? void 0 : response.statusCode.toString());
1053
1056
  }
1054
1057
 
1055
1058
  case 6: