contentoh-components-library 21.0.34 → 21.0.37
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.
|
@@ -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",
|
|
@@ -281,7 +284,7 @@ var SignInLogin = function SignInLogin(props) {
|
|
|
281
284
|
})
|
|
282
285
|
})]
|
|
283
286
|
})
|
|
284
|
-
}), upgradePlanRedirect && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactRouterDom.
|
|
287
|
+
}), upgradePlanRedirect && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactRouterDom.Redirect, {
|
|
285
288
|
to: {
|
|
286
289
|
pathname: "/dashboard"
|
|
287
290
|
}
|
package/dist/index.js
CHANGED
|
@@ -1,19 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
-
|
|
5
3
|
Object.defineProperty(exports, "__esModule", {
|
|
6
4
|
value: true
|
|
7
5
|
});
|
|
8
6
|
|
|
9
|
-
var _reactDom = _interopRequireDefault(require("react-dom"));
|
|
10
|
-
|
|
11
|
-
var _App = _interopRequireDefault(require("./App.jsx"));
|
|
12
|
-
|
|
13
|
-
var _awsAmplify = _interopRequireDefault(require("aws-amplify"));
|
|
14
|
-
|
|
15
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
16
|
-
|
|
17
7
|
var _index = require("./components/atoms/ActivedFilter/index");
|
|
18
8
|
|
|
19
9
|
Object.keys(_index).forEach(function (key) {
|
|
@@ -805,15 +795,4 @@ Object.keys(_VerificationCodeResetPassword).forEach(function (key) {
|
|
|
805
795
|
return _VerificationCodeResetPassword[key];
|
|
806
796
|
}
|
|
807
797
|
});
|
|
808
|
-
});
|
|
809
|
-
|
|
810
|
-
_reactDom.default.render( /*#__PURE__*/(0, _jsxRuntime.jsx)(_App.default, {}), document.getElementById("root"));
|
|
811
|
-
|
|
812
|
-
_awsAmplify.default.configure({
|
|
813
|
-
Auth: {
|
|
814
|
-
region: "us-east-1",
|
|
815
|
-
userPoolId: process.env.REACT_APP_USER_POOL_ID,
|
|
816
|
-
userPoolWebClientId: process.env.REACT_APP_USER_POOL_WEB_CLIENT_ID,
|
|
817
|
-
mandatorySignIn: true
|
|
818
|
-
}
|
|
819
|
-
}); //atoms
|
|
798
|
+
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "contentoh-components-library",
|
|
3
|
-
"version": "21.0.
|
|
3
|
+
"version": "21.0.37",
|
|
4
4
|
"dependencies": {
|
|
5
5
|
"@aws-amplify/auth": "^4.5.3",
|
|
6
6
|
"@aws-amplify/datastore": "^3.11.0",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"react-chartjs-2": "^4.1.0",
|
|
22
22
|
"react-dom": "^17.0.2",
|
|
23
23
|
"react-image-fallback": "^8.0.0",
|
|
24
|
-
"react-router-dom": "^
|
|
24
|
+
"react-router-dom": "^5.2.0",
|
|
25
25
|
"styled-components": "^5.3.3",
|
|
26
26
|
"web-vitals": "^1.0.1"
|
|
27
27
|
},
|
|
@@ -7,7 +7,7 @@ import { TagAndInput } from "../TagAndInput";
|
|
|
7
7
|
import { FontFamily, GlobalColors } from "../../../global-files/variables";
|
|
8
8
|
import { useState, useEffect } from "react";
|
|
9
9
|
import { Loading } from "../../atoms/Loading";
|
|
10
|
-
import {
|
|
10
|
+
import { Redirect } from "react-router-dom";
|
|
11
11
|
import axios from "axios";
|
|
12
12
|
|
|
13
13
|
export const SignInLogin = (props) => {
|
|
@@ -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
|
) : (
|
|
@@ -200,7 +203,7 @@ export const SignInLogin = (props) => {
|
|
|
200
203
|
</div>
|
|
201
204
|
</div>
|
|
202
205
|
</Container>
|
|
203
|
-
{upgradePlanRedirect && <
|
|
206
|
+
{upgradePlanRedirect && <Redirect to={{ pathname: "/dashboard" }} />}
|
|
204
207
|
</>
|
|
205
208
|
);
|
|
206
209
|
};
|
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";
|