Skip to content

Commit afe1a2b

Browse files
authored
Merge pull request #127 from prafull-opensignlabs/staging
2 parents 6ac3238 + 2c3b4ec commit afe1a2b

File tree

5 files changed

+11
-7
lines changed

5 files changed

+11
-7
lines changed

apps/OpenSign/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
},
4242
"scripts": {
4343
"start": "mf-cra start",
44-
"build": "npm run micro && CI=false && mf-cra build",
44+
"build": "rm -rf public/mfbuild/* && npm run micro && CI=false && mf-cra build",
4545
"micro": "cd ../../microfrontends/SignDocuments && npm install && npm run build",
4646
"test": "react-scripts test",
4747
"eject": "react-scripts eject",
@@ -84,4 +84,4 @@
8484
"pretty-quick": "^3.1.3",
8585
"tailwindcss": "^3.3.3"
8686
}
87-
}
87+
}

apps/OpenSign/public/mfbuild/.gitkeep

Whitespace-only changes.

apps/OpenSign/src/components/ReportMicroapp.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ const MicroappModal = () => {
1515
// console.log("value ", key + ":" + value);
1616

1717
if (key === "remoteUrl") {
18-
obj = { ...obj, [key]: atob(value) };
18+
const url = window.location.origin + "/mfbuild/remoteEntry.js";
19+
// console.log("atob(value) ", atob(value))
20+
obj = { ...obj, [key]: url };
1921
} else {
2022
if (key === "moduleToLoad") {
2123
obj = { ...obj, [key]: "./" + value };
@@ -45,9 +47,9 @@ const MicroappModal = () => {
4547
>
4648
Back
4749
</button>
48-
{localStorage.getItem('domain') && (
50+
{localStorage.getItem("domain") && (
4951
<p className="flex-1 w-full text-sm md:text-base text-black text-center">
50-
{localStorage.getItem('domain') === "contracts" ? "Document":""}
52+
{localStorage.getItem("domain") === "contracts" ? "Document" : ""}
5153
</p>
5254
)}
5355
</div>

apps/OpenSign/src/routes/RemoteApp.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,9 @@ export default function RemoteAppContainer() {
6565
// console.log("value ", key + ":" + value);
6666

6767
if (key === "remoteUrl") {
68-
obj = { ...obj, [key]: atob(value) };
68+
const url = window.location.origin + "/mfbuild/remoteEntry.js";
69+
// console.log("atob(value) ", atob(value))
70+
obj = { ...obj, [key]: url };
6971
} else {
7072
if (key === "moduleToLoad") {
7173
obj = { ...obj, [key]: "./" + value };

microfrontends/SignDocuments/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
},
3636
"scripts": {
3737
"start": "mf-cra start",
38-
"build": "CI=false && mf-cra build && mv build ../../apps/OpenSign/public/mfbuild",
38+
"build": "CI=false && mf-cra build && mv build/* ../../apps/OpenSign/public/mfbuild",
3939
"test": "react-scripts test",
4040
"eject": "react-scripts eject"
4141
},

0 commit comments

Comments
 (0)