Remove duplicate code

This commit is contained in:
rishabjasrotia
2023-11-16 20:14:32 +05:30
parent 876a2d78d5
commit b8e8cd127a
3 changed files with 15 additions and 24 deletions
@@ -25,6 +25,7 @@ import Nodata from "./component/Nodata";
import Header from "./component/header";
import RenderPdf from "./component/renderPdf";
import { contractUsers, contactBook } from "../utils/Utils";
import { modalAlign } from "../utils/Utils";
import { $ } from 'select-dom';
//For signYourself inProgress section signer can add sign and complete doc sign.
function SignYourSelf() {
@@ -996,17 +997,6 @@ function SignYourSelf() {
});
};
const modalAlign = () => {
let modalDialog = $('.modal-dialog').getBoundingClientRect();
let mobileHead = $('.mobileHead').getBoundingClientRect()
let modal = $('.modal-dialog');
if (modalDialog.left < mobileHead.left) {
let leftOffset = mobileHead.left - modalDialog.left;
modal.style.left = leftOffset + 'px';
modal.style.top = (window.innerHeight/3) + 'px';
}
};
return (
<DndProvider backend={HTML5Backend}>
{isLoading.isLoad ? (
@@ -25,7 +25,7 @@ import Nodata from "./component/Nodata";
import Header from "./component/header";
import RenderPdf from "./component/renderPdf";
import CustomModal from "./component/CustomModal";
import { $ } from 'select-dom';
import { modalAlign } from "../utils/Utils";
function EmbedPdfImage() {
const { id, contactBookId } = useParams();
const [isSignPad, setIsSignPad] = useState(false);
@@ -954,17 +954,6 @@ function EmbedPdfImage() {
);
};
const modalAlign = () => {
let modalDialog = $('.modal-dialog').getBoundingClientRect();
let mobileHead = $('.mobileHead').getBoundingClientRect()
let modal = $('.modal-dialog');
if (modalDialog.left < mobileHead.left) {
let leftOffset = mobileHead.left - modalDialog.left;
modal.style.left = leftOffset + 'px';
modal.style.top = (window.innerHeight/3) + 'px';
}
};
return (
<DndProvider backend={HTML5Backend}>
{isLoading.isLoad ? (