contentoh-components-library 21.0.33 → 21.0.36
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.
|
@@ -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
|
}
|
|
@@ -195,6 +195,9 @@ var SignInLogin = function SignInLogin(props) {
|
|
|
195
195
|
(0, _react.useEffect)(function () {
|
|
196
196
|
sessionStorage.getItem("resetPasswordProcess") && sessionStorage.removeItem("resetPasswordProcess");
|
|
197
197
|
}, []);
|
|
198
|
+
(0, _react.useEffect)(function () {
|
|
199
|
+
if (upgradePlanRedirect) setLoading(false);
|
|
200
|
+
}, [upgradePlanRedirect]);
|
|
198
201
|
return loading ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_Loading.Loading, {}) : /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
199
202
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.Container, {
|
|
200
203
|
className: "home-login",
|
package/package.json
CHANGED
|
@@ -91,7 +91,7 @@ export const SignInLogin = (props) => {
|
|
|
91
91
|
} catch (error) {
|
|
92
92
|
console.log(error);
|
|
93
93
|
setLoading(false);
|
|
94
|
-
console.log("error 1")
|
|
94
|
+
console.log("error 1");
|
|
95
95
|
if (error.code === "NotAuthorizedException") {
|
|
96
96
|
setSignInError("NotAuthorizedException");
|
|
97
97
|
} else if (error.code === "UserNotConfirmedException") {
|
|
@@ -105,7 +105,7 @@ export const SignInLogin = (props) => {
|
|
|
105
105
|
props.setPaso(5);
|
|
106
106
|
} else {
|
|
107
107
|
setSignInError("Error");
|
|
108
|
-
console.log("error 2")
|
|
108
|
+
console.log("error 2");
|
|
109
109
|
}
|
|
110
110
|
}
|
|
111
111
|
}
|
|
@@ -114,6 +114,9 @@ export const SignInLogin = (props) => {
|
|
|
114
114
|
sessionStorage.getItem("resetPasswordProcess") &&
|
|
115
115
|
sessionStorage.removeItem("resetPasswordProcess");
|
|
116
116
|
}, []);
|
|
117
|
+
useEffect(() => {
|
|
118
|
+
if (upgradePlanRedirect) setLoading(false);
|
|
119
|
+
}, [upgradePlanRedirect]);
|
|
117
120
|
return loading ? (
|
|
118
121
|
<Loading />
|
|
119
122
|
) : (
|
package/src/index.js
CHANGED
|
@@ -1,19 +1,3 @@
|
|
|
1
|
-
import ReactDOM from "react-dom";
|
|
2
|
-
import App from "./App.jsx";
|
|
3
|
-
import Amplify from "aws-amplify";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
ReactDOM.render(<App />, document.getElementById("root"));
|
|
7
|
-
|
|
8
|
-
Amplify.configure({
|
|
9
|
-
Auth: {
|
|
10
|
-
region: "us-east-1",
|
|
11
|
-
userPoolId: process.env.REACT_APP_USER_POOL_ID,
|
|
12
|
-
userPoolWebClientId: process.env.REACT_APP_USER_POOL_WEB_CLIENT_ID,
|
|
13
|
-
mandatorySignIn: true,
|
|
14
|
-
},
|
|
15
|
-
});
|
|
16
|
-
|
|
17
1
|
//atoms
|
|
18
2
|
export * from "./components/atoms/ActivedFilter/index";
|
|
19
3
|
export * from "./components/atoms/AsignationOption/index";
|