diff --git a/.env.example b/.env.example
index cd2978cc0..6fc74933f 100644
--- a/.env.example
+++ b/.env.example
@@ -1,6 +1,5 @@
# Frontend config ************************************************************************************************************************************************************************************************
-# Set CI to false while running the app locally
-CI=false
+
# Set it to the URL form where the app home page will be accessed
PUBLIC_URL=https://app.opensignlabs.com/
# Set it to true if you want to generate the Sourcemap for debugging
diff --git a/.env.frontend_dev b/.env.frontend_dev
index d36422a82..f16acf752 100644
--- a/.env.frontend_dev
+++ b/.env.frontend_dev
@@ -2,8 +2,6 @@
# When used as it is, this env config will connect to our hosted UAT backend
# Note that any data in staging will get cleared from time to time and you may have to sign up again and again
-# Set CI to false while running the app locally
-CI=false
# Set it to the URL form where the app home page will be accessed
PUBLIC_URL=http://localhost:3000
# Set it to true if you want to generate the Sourcemap for debugging
diff --git a/.env.local_dev b/.env.local_dev
index 93eff6132..34fd3bf89 100644
--- a/.env.local_dev
+++ b/.env.local_dev
@@ -2,8 +2,6 @@
# When used as it is, this env config will connect to our hosted UAT backend
# Note that any data in staging will get cleared from time to time and you may have to sign up again and again
-# Set CI to false while running the app locally
-CI=false
# Set it to the URL form where the app home page will be accessed
PUBLIC_URL=http://localhost:3000
# Set it to true if you want to generate the Sourcemap for debugging
diff --git a/apps/OpenSign/src/components/ErrorBoundary.js b/apps/OpenSign/src/components/ErrorBoundary.js
deleted file mode 100644
index e15a818df..000000000
--- a/apps/OpenSign/src/components/ErrorBoundary.js
+++ /dev/null
@@ -1,49 +0,0 @@
-import React, { Component } from "react";
-
-export class ErrorBoundary extends Component {
- constructor(props) {
- super(props);
- this.state = { hasError: false };
- }
-
- static getDerivedStateFromError() {
- return {
- hasError: true
- };
- }
-
- componentDidCatch(error, info) {
- console.log(error);
- console.log(info);
- }
-
- render() {
- if (this.state.hasError) {
- return (
-
-
{pdfLoadFail.status &&
(pdfRequest
? signerPos.map((data, key) => {
@@ -514,7 +514,6 @@ function RenderPdf({
ref={drop}
id="container"
>
-
{pdfLoadFail.status &&
(pdfRequest
? signerPos.map((data, key) => {
diff --git a/apps/OpenSign/src/primitives/Alert.js b/apps/OpenSign/src/primitives/Alert.js
index 72e3d1458..4a99792f2 100644
--- a/apps/OpenSign/src/primitives/Alert.js
+++ b/apps/OpenSign/src/primitives/Alert.js
@@ -18,7 +18,7 @@ const Alert = ({ children, type }) => {
<>
{children && (
{children}
diff --git a/apps/OpenSign/src/primitives/EmailToast.js b/apps/OpenSign/src/primitives/EmailToast.js
deleted file mode 100644
index d22293cdc..000000000
--- a/apps/OpenSign/src/primitives/EmailToast.js
+++ /dev/null
@@ -1,21 +0,0 @@
-import React from "react";
-import "../styles/signature.css";
-
-function EmailToast({ isShow }) {
- return (
- <>
- {isShow && (
-
-
- Email sent successfully!
-
-
- )}
- >
- );
-}
-
-export default EmailToast;
diff --git a/apps/OpenSign/src/primitives/Nodata.js b/apps/OpenSign/src/primitives/Nodata.js
deleted file mode 100644
index eab59c261..000000000
--- a/apps/OpenSign/src/primitives/Nodata.js
+++ /dev/null
@@ -1,18 +0,0 @@
-import React from "react";
-
-function Nodata() {
- return (
-
- No Data Found!
-
- );
-}
-
-export default Nodata;
diff --git a/apps/OpenSign/src/routes/Login.js b/apps/OpenSign/src/routes/Login.js
index 04c49ac2f..dfe3003aa 100644
--- a/apps/OpenSign/src/routes/Login.js
+++ b/apps/OpenSign/src/routes/Login.js
@@ -1,6 +1,5 @@
import React, { useEffect, useState } from "react";
import Parse from "parse";
-import "../styles/toast.css";
import "../styles/loader.css";
import { connect } from "react-redux";
import { fetchAppInfo, showTenantName } from "../redux/actions";
@@ -13,6 +12,7 @@ import login_img from "../assets/images/login_img.svg";
import { useWindowSize } from "../hook/useWindowSize";
import ModalUi from "../primitives/ModalUi";
import { modalCancelBtnColor, modalSubmitBtnColor } from "../constant/const";
+import Alert from "../primitives/Alert";
function Login(props) {
const navigate = useNavigate();
@@ -20,8 +20,8 @@ function Login(props) {
const { width } = useWindowSize();
const [state, setState] = useState({
email: "",
- toastColor: "#5cb85c",
- toastDescription: "",
+ alertType: "success",
+ alertMsg: "",
password: "",
passwordVisible: false,
mobile: "",
@@ -354,13 +354,16 @@ function Login(props) {
setState({
...state,
loading: false,
- toastColor: "#d9534f",
- toastDescription: `${error.message}`
+ alertType: "danger",
+ alertMsg: `${error.message}`
});
- const x = document.getElementById("snackbar");
- x.className = "show";
setTimeout(function () {
- x.className = x.className.replace("show", "");
+ setState({
+ ...state,
+ loading: false,
+ alertType: "danger",
+ alertMsg: ""
+ });
}, 2000);
console.log(error);
}
@@ -370,13 +373,16 @@ function Login(props) {
setState({
...state,
loading: false,
- toastColor: "#d9534f",
- toastDescription: "Login failed: Invalid username or password."
+ alertType: "danger",
+ alertMsg: "Invalid username or password!"
});
- const x = document.getElementById("snackbar");
- x.className = "show";
setTimeout(function () {
- x.className = x.className.replace("show", "");
+ setState({
+ ...state,
+ loading: false,
+ alertType: "danger",
+ alertMsg: ""
+ });
}, 2000);
console.error("Error while logging in user", error);
});
@@ -647,13 +653,16 @@ function Login(props) {
setState({
...state,
loading: false,
- toastColor: "#d9534f",
- toastDescription: `${error.message}`
+ alertType: "danger",
+ alertMsg: `${error.message}`
});
- const x = document.getElementById("snackbar");
- x.className = "show";
setTimeout(function () {
- x.className = x.className.replace("show", "");
+ setState({
+ ...state,
+ loading: false,
+ alertType: "danger",
+ alertMsg: ""
+ });
}, 2000);
console.log(error);
}
@@ -717,13 +726,17 @@ function Login(props) {
setState({
...state,
loading: false,
- toastColor: "#d9534f",
- toastDescription: `Does not have permissions to access this application.`
+ alertType: "danger",
+ alertMsg:
+ "Does not have permissions to access this application!"
});
- const x = document.getElementById("snackbar");
- x.className = "show";
setTimeout(function () {
- x.className = x.className.replace("show", "");
+ setState({
+ ...state,
+ loading: false,
+ alertType: "danger",
+ alertMsg: ""
+ });
}, 2000);
}
// _currentRole = userRoles[0];
@@ -802,14 +815,16 @@ function Login(props) {
setState({
...state,
loading: false,
- toastColor: "#d9534f",
- toastDescription:
- "You don`t have access to this application."
+ alertType: "danger",
+ alertMsg: "You don`t have access to this application!"
});
- const x = document.getElementById("snackbar");
- x.className = "show";
setTimeout(function () {
- x.className = x.className.replace("show", "");
+ setState({
+ ...state,
+ loading: false,
+ alertType: "danger",
+ alertMsg: ""
+ });
}, 2000);
localStorage.setItem("accesstoken", null);
console.error("Error while fetching Follow", error);
@@ -1124,14 +1139,7 @@ function Login(props) {
)}
-
-