Skip to content

Commit 535f7eb

Browse files
committed
Issues-9: using Vanilla embed.js
1 parent 8aff6cc commit 535f7eb

File tree

1 file changed

+10
-11
lines changed

1 file changed

+10
-11
lines changed

src/root.component.jsx

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,20 @@
11
import React, { useEffect } from "react";
2-
// import { VANILLA_EMBED_JS } from "./constants";
2+
import { VANILLA_EMBED_JS } from "./constants";
33
import { disableSidebarForRoute } from "@topcoder/micro-frontends-navbar-app";
44
import "styles/global.scss";
5-
import ebmedJs from "./embed-test";
5+
// import ebmedJs from "./embed-test";
66

77
export default function Root() {
88
useEffect(() => {
9+
// ebmedJs();
910
disableSidebarForRoute("/forums/*");
10-
ebmedJs();
11-
// embed.js
12-
// const script = document.createElement("script");
13-
// script.src = VANILLA_EMBED_JS;
14-
// script.async = true;
15-
// document.body.appendChild(script);
16-
// return () => {
17-
// document.body.removeChild(script);
18-
// };
11+
const script = document.createElement("script");
12+
script.src = VANILLA_EMBED_JS;
13+
script.async = true;
14+
document.body.appendChild(script);
15+
return () => {
16+
document.body.removeChild(script);
17+
};
1918
}, []);
2019

2120
return (

0 commit comments

Comments
 (0)