Skip to content

Commit d255d5b

Browse files
Merge pull request #151 from prafull-opensignlabs/mf_header
2 parents f5e835c + 3f60509 commit d255d5b

File tree

1 file changed

+26
-50
lines changed

1 file changed

+26
-50
lines changed

apps/OpenSign/src/components/ReportMicroapp.js

Lines changed: 26 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import useFederatedComponent from "mf-cra";
22
import React, { Suspense, useEffect } from "react";
3-
import { useNavigate, useParams } from "react-router-dom";
3+
import { useParams } from "react-router-dom";
44

55
const MicroappModal = () => {
66
const { remoteApp } = useParams();
@@ -28,60 +28,36 @@ const MicroappModal = () => {
2828
}
2929
// console.log("app ", remoteApp);
3030
const { Component: RemoteComponent } = useFederatedComponent(obj);
31-
const navigate = useNavigate();
3231
// console.log("RemoteComponent ", RemoteComponent);
3332
return (
3433
<div className="w-full h-full flex items-center justify-center ">
35-
{/* <!-- Modal Container --> */}
36-
<div className="bg-white rounded-lg shadow-lg w-full">
37-
{/* <!-- Modal Header --> */}
38-
<div className="flex w-full items-center border-b-2 mb-2 p-2">
39-
<button
40-
className="focus:outline-none bg-blue-500 text-white text-sm shadow px-2.5 py-1 rounded"
41-
id="closeModal"
42-
onClick={(e) => {
43-
e.preventDefault();
44-
// setIsModal(false);
45-
navigate(-1);
34+
<div className="w-full">
35+
<Suspense
36+
fallback={
37+
<div style={{ height: "300px" }}>
38+
<div
39+
style={{
40+
marginLeft: "45%",
41+
marginTop: "150px",
42+
fontSize: "45px",
43+
color: "#3dd3e0"
44+
}}
45+
className="loader-37"
46+
></div>
47+
</div>
48+
}
49+
>
50+
<div
51+
style={{
52+
backgroundColor: "#ffffff",
53+
width: "100%",
54+
overflow: "hidden",
55+
minHeight: "50vh"
4656
}}
4757
>
48-
Back
49-
</button>
50-
{localStorage.getItem("domain") && (
51-
<p className="flex-1 w-full text-sm md:text-base text-black text-center">
52-
{localStorage.getItem("domain") === "contracts" ? "Document" : ""}
53-
</p>
54-
)}
55-
</div>
56-
{/* <!-- Modal Body --> */}
57-
<div className="w-full">
58-
<Suspense
59-
fallback={
60-
<div style={{ height: "300px" }}>
61-
<div
62-
style={{
63-
marginLeft: "45%",
64-
marginTop: "150px",
65-
fontSize: "45px",
66-
color: "#3dd3e0"
67-
}}
68-
className="loader-37"
69-
></div>
70-
</div>
71-
}
72-
>
73-
<div
74-
style={{
75-
backgroundColor: "#ffffff",
76-
width: "100%",
77-
overflow: "hidden",
78-
minHeight: "50vh"
79-
}}
80-
>
81-
{RemoteComponent && <RemoteComponent />}
82-
</div>
83-
</Suspense>
84-
</div>
58+
{RemoteComponent && <RemoteComponent />}
59+
</div>
60+
</Suspense>
8561
</div>
8662
</div>
8763
);

0 commit comments

Comments
 (0)