fix: resolve warning

This commit is contained in:
RaktimaNXG
2024-08-09 15:31:57 +05:30
parent 50b0a3ea17
commit 00e6ea5b3b
7 changed files with 21 additions and 21 deletions
+2 -3
View File
@@ -11,8 +11,7 @@ export const isEnableSubscription =
: false;
export const isStaging =
window.location.origin === "https://staging-app.opensignlabs.com";
export const isPublic =
window.location.origin === "https://opensign.me" ||
window.location.origin === "https://staging.opensign.me";
export const isPublicProduction =
window.location.origin === "https://opensign.me";
export const isPublicStaging =
window.location.origin === "https://staging.opensign.me";
+5 -3
View File
@@ -2,12 +2,14 @@ import i18n from "i18next";
import { initReactI18next } from "react-i18next";
import Backend from "i18next-http-backend";
import LanguageDetector from "i18next-browser-languagedetector";
import { isPublic } from "./constant/const";
import { isPublicProduction, isPublicStaging } from "./constant/const";
//handle path to support language on public profile
const backendPath = isPublic
const backendPath = isPublicStaging
? "https://staging-app.opensignlabs.com/locales/{{lng}}/{{ns}}.json"
: "/locales/{{lng}}/{{ns}}.json";
: isPublicProduction
? "https://app.opensignlabs.com/locales/{{lng}}/{{ns}}.json"
: "/locales/{{lng}}/{{ns}}.json";
i18n
.use(Backend)
+10 -15
View File
@@ -190,28 +190,20 @@ function PlaceHolderSign() {
if (user) {
try {
const defaultRequestBody = `<p>Hi {{receiver_name}},</p><br><p>We hope this email finds you well. {{sender_name}}&nbsp;has requested you to review and sign&nbsp;{{document_title}}.</p><p>Your signature is crucial to proceed with the next steps as it signifies your agreement and authorization.</p><br><p>{{signing_url}}</p><br><p>If you have any questions or need further clarification regarding the document or the signing process, please contact the sender.</p><br><p>Thanks</p><p> Team OpenSign™</p><br>`;
const defaultSubject = `{{sender_name}} has requested you to sign {{document_title}}`;
setDefaultBody(defaultRequestBody);
setDefaultSubject(defaultSubject);
const tenantDetails = await getTenantDetails(user?.objectId);
if (tenantDetails && tenantDetails === "user does not exist!") {
alert(t("user-not-exist"));
} else if (tenantDetails) {
const defaultRequestBody = `<p>Hi {{receiver_name}},</p><br><p>We hope this email finds you well. {{sender_name}}&nbsp;has requested you to review and sign&nbsp;{{document_title}}.</p><p>Your signature is crucial to proceed with the next steps as it signifies your agreement and authorization.</p><br><p>{{signing_url}}</p><br><p>If you have any questions or need further clarification regarding the document or the signing process, please contact the sender.</p><br><p>Thanks</p><p> Team OpenSign™</p><br>`;
if (tenantDetails?.RequestBody) {
setRequestBody(tenantDetails?.RequestBody);
setRequestSubject(tenantDetails?.RequestSubject);
setDefaultBody(defaultRequestBody);
setDefaultSubject(
`{{sender_name}} has requested you to sign {{document_title}}`
);
} else {
setRequestBody(defaultRequestBody);
setRequestSubject(
`{{sender_name}} has requested you to sign {{document_title}}`
);
setDefaultBody(defaultRequestBody);
setDefaultSubject(
`{{sender_name}}has requested you to sign {{document_title}}`
);
setRequestSubject(defaultSubject);
}
}
} catch (e) {
@@ -222,6 +214,7 @@ function PlaceHolderSign() {
}
};
console.log("default body", defaultBody);
useEffect(() => {
const updateSize = () => {
if (divRef.current) {
@@ -1772,8 +1765,10 @@ function PlaceHolderSign() {
<>
<EmailBody
editorRef={editorRef}
requestBody={requestBody}
requestSubject={requestSubject}
requestBody={requestBody || defaultBody}
requestSubject={
requestSubject || defaultSubject
}
handleOnchangeRequest={handleOnchangeRequest}
setRequestSubject={setRequestSubject}
/>
+1
View File
@@ -97,6 +97,7 @@ const TeamList = () => {
const pageNumbers = getPaginationRange();
useEffect(() => {
fetchTeamList();
// eslint-disable-next-line react-hooks/exhaustive-deps
}, []);
async function fetchTeamList() {
try {
+1
View File
@@ -85,6 +85,7 @@ const UserList = () => {
const pageNumbers = getPaginationRange();
useEffect(() => {
fetchUserList();
// eslint-disable-next-line react-hooks/exhaustive-deps
}, []);
async function fetchUserList() {
try {
+1
View File
@@ -57,6 +57,7 @@ function UserProfile() {
useEffect(() => {
getUserDetail();
// eslint-disable-next-line react-hooks/exhaustive-deps
}, []);
const getUserDetail = async () => {
@@ -23,6 +23,7 @@ const ValidateRoute = () => {
}
}
})();
// eslint-disable-next-line react-hooks/exhaustive-deps
}, []);
const handlelogout = async () => {
let appdata = localStorage.getItem("userSettings");