|
1 | 1 | import useFederatedComponent from "mf-cra";
|
2 | 2 | import React, { Suspense, useEffect } from "react";
|
3 |
| -import { useNavigate, useParams } from "react-router-dom"; |
| 3 | +import { useParams } from "react-router-dom"; |
4 | 4 |
|
5 | 5 | const MicroappModal = () => {
|
6 | 6 | const { remoteApp } = useParams();
|
@@ -28,60 +28,36 @@ const MicroappModal = () => {
|
28 | 28 | }
|
29 | 29 | // console.log("app ", remoteApp);
|
30 | 30 | const { Component: RemoteComponent } = useFederatedComponent(obj);
|
31 |
| - const navigate = useNavigate(); |
32 | 31 | // console.log("RemoteComponent ", RemoteComponent);
|
33 | 32 | return (
|
34 | 33 | <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" |
46 | 56 | }}
|
47 | 57 | >
|
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> |
85 | 61 | </div>
|
86 | 62 | </div>
|
87 | 63 | );
|
|
0 commit comments