contentoh-components-library 21.0.32 → 21.0.35
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.
package/.env.development
CHANGED
|
@@ -2,4 +2,6 @@ REACT_APP_ARTICLE_DATA_DATASHEET_ENDPOINT=https://zhx2nmgyce.execute-api.us-east
|
|
|
2
2
|
REACT_APP_ARTICLE_DATA_DESCRIPTION_ENDPOINT=https://zhx2nmgyce.execute-api.us-east-1.amazonaws.com/dev/articles-data/descriptions
|
|
3
3
|
REACT_APP_ARTICLE_DATA_IMAGES_ENDPOINT=https://zhx2nmgyce.execute-api.us-east-1.amazonaws.com/dev/articles-data/images
|
|
4
4
|
REACT_APP_USER_ENDPOINT=https://lqrc8jfjqi.execute-api.us-east-1.amazonaws.com/dev/users
|
|
5
|
-
REACT_APP_IMAGES_PROFILE_BUCKET=content-management-profile
|
|
5
|
+
REACT_APP_IMAGES_PROFILE_BUCKET=content-management-profile
|
|
6
|
+
REACT_APP_USER_POOL_ID=us-east-1_XMZQdqkGj
|
|
7
|
+
REACT_APP_USER_POOL_WEB_CLIENT_ID=5ac8tpgs6gbsq13frvrpieep40
|
package/.env.production
CHANGED
|
@@ -2,4 +2,6 @@ REACT_APP_ARTICLE_DATA_DATASHEET_ENDPOINT=https://6jqnpjf841.execute-api.us-east
|
|
|
2
2
|
REACT_APP_ARTICLE_DATA_DESCRIPTION_ENDPOINT=https://6jqnpjf841.execute-api.us-east-1.amazonaws.com/prod/articles-data/descriptions
|
|
3
3
|
REACT_APP_ARTICLE_DATA_IMAGES_ENDPOINT=https://6jqnpjf841.execute-api.us-east-1.amazonaws.com/prod/articles-data/images
|
|
4
4
|
REACT_APP_IMAGES_PROFILE_BUCKET=content-management-profile-prod
|
|
5
|
-
REACT_APP_USER_ENDPOINT=https://6jqnpjf841.execute-api.us-east-1.amazonaws.com/prod/users
|
|
5
|
+
REACT_APP_USER_ENDPOINT=https://6jqnpjf841.execute-api.us-east-1.amazonaws.com/prod/users
|
|
6
|
+
REACT_APP_USER_POOL_ID=us-east-1_XMZQdqkGj
|
|
7
|
+
REACT_APP_USER_POOL_WEB_CLIENT_ID=5ac8tpgs6gbsq13frvrpieep40
|
|
@@ -33,8 +33,6 @@ var _Loading = require("../../atoms/Loading");
|
|
|
33
33
|
|
|
34
34
|
var _reactRouterDom = require("react-router-dom");
|
|
35
35
|
|
|
36
|
-
var _awsAmplify = require("aws-amplify");
|
|
37
|
-
|
|
38
36
|
var _axios = _interopRequireDefault(require("axios"));
|
|
39
37
|
|
|
40
38
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
@@ -105,14 +103,14 @@ var SignInLogin = function SignInLogin(props) {
|
|
|
105
103
|
}
|
|
106
104
|
|
|
107
105
|
if (!valid) {
|
|
108
|
-
_context.next =
|
|
106
|
+
_context.next = 34;
|
|
109
107
|
break;
|
|
110
108
|
}
|
|
111
109
|
|
|
112
110
|
_context.prev = 10;
|
|
113
111
|
setLoading(true);
|
|
114
112
|
_context.next = 14;
|
|
115
|
-
return
|
|
113
|
+
return props.Auth.signIn(email, password);
|
|
116
114
|
|
|
117
115
|
case 14:
|
|
118
116
|
session = _context.sent;
|
|
@@ -160,7 +158,7 @@ var SignInLogin = function SignInLogin(props) {
|
|
|
160
158
|
}
|
|
161
159
|
|
|
162
160
|
case 26:
|
|
163
|
-
_context.next =
|
|
161
|
+
_context.next = 34;
|
|
164
162
|
break;
|
|
165
163
|
|
|
166
164
|
case 28:
|
|
@@ -168,6 +166,7 @@ var SignInLogin = function SignInLogin(props) {
|
|
|
168
166
|
_context.t0 = _context["catch"](10);
|
|
169
167
|
console.log(_context.t0);
|
|
170
168
|
setLoading(false);
|
|
169
|
+
console.log("error 1");
|
|
171
170
|
|
|
172
171
|
if (_context.t0.code === "NotAuthorizedException") {
|
|
173
172
|
setSignInError("NotAuthorizedException");
|
|
@@ -177,9 +176,10 @@ var SignInLogin = function SignInLogin(props) {
|
|
|
177
176
|
props.setPaso(5);
|
|
178
177
|
} else {
|
|
179
178
|
setSignInError("Error");
|
|
179
|
+
console.log("error 2");
|
|
180
180
|
}
|
|
181
181
|
|
|
182
|
-
case
|
|
182
|
+
case 34:
|
|
183
183
|
case "end":
|
|
184
184
|
return _context.stop();
|
|
185
185
|
}
|
package/package.json
CHANGED
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "contentoh-components-library",
|
|
3
|
-
"version": "21.0.
|
|
3
|
+
"version": "21.0.35",
|
|
4
4
|
"dependencies": {
|
|
5
|
-
"@aws-amplify/auth": "^4.5.
|
|
5
|
+
"@aws-amplify/auth": "^4.5.3",
|
|
6
|
+
"@aws-amplify/datastore": "^3.11.0",
|
|
7
|
+
"@aws-amplify/ui-react": "^2.17.0",
|
|
6
8
|
"@babel/runtime": "^7.17.2",
|
|
7
9
|
"@storybook/addon-postcss": "^2.0.0",
|
|
8
10
|
"@testing-library/jest-dom": "^5.11.4",
|
|
9
11
|
"@testing-library/react": "^11.1.0",
|
|
10
12
|
"@testing-library/user-event": "^12.1.10",
|
|
11
|
-
"aws-amplify": "^4.3.
|
|
13
|
+
"aws-amplify": "^4.3.21",
|
|
14
|
+
"aws-sdk": "^2.959.0",
|
|
12
15
|
"axios": "^0.25.0",
|
|
13
16
|
"babel-preset-react-app": "^10.0.1",
|
|
14
17
|
"chart.js": "^3.7.1",
|
|
@@ -8,7 +8,6 @@ import { FontFamily, GlobalColors } from "../../../global-files/variables";
|
|
|
8
8
|
import { useState, useEffect } from "react";
|
|
9
9
|
import { Loading } from "../../atoms/Loading";
|
|
10
10
|
import { Navigate } from "react-router-dom";
|
|
11
|
-
import { Auth } from "aws-amplify";
|
|
12
11
|
import axios from "axios";
|
|
13
12
|
|
|
14
13
|
export const SignInLogin = (props) => {
|
|
@@ -46,7 +45,7 @@ export const SignInLogin = (props) => {
|
|
|
46
45
|
if (valid) {
|
|
47
46
|
try {
|
|
48
47
|
setLoading(true);
|
|
49
|
-
const session = await Auth.signIn(email, password);
|
|
48
|
+
const session = await props.Auth.signIn(email, password);
|
|
50
49
|
if (session.challengeName === "NEW_PASSWORD_REQUIRED") {
|
|
51
50
|
props.setUser(session);
|
|
52
51
|
props.setPaso(8);
|
|
@@ -92,6 +91,7 @@ export const SignInLogin = (props) => {
|
|
|
92
91
|
} catch (error) {
|
|
93
92
|
console.log(error);
|
|
94
93
|
setLoading(false);
|
|
94
|
+
console.log("error 1")
|
|
95
95
|
if (error.code === "NotAuthorizedException") {
|
|
96
96
|
setSignInError("NotAuthorizedException");
|
|
97
97
|
} else if (error.code === "UserNotConfirmedException") {
|
|
@@ -105,6 +105,7 @@ export const SignInLogin = (props) => {
|
|
|
105
105
|
props.setPaso(5);
|
|
106
106
|
} else {
|
|
107
107
|
setSignInError("Error");
|
|
108
|
+
console.log("error 2")
|
|
108
109
|
}
|
|
109
110
|
}
|
|
110
111
|
}
|