File tree Expand file tree Collapse file tree 1 file changed +10
-11
lines changed Expand file tree Collapse file tree 1 file changed +10
-11
lines changed Original file line number Diff line number Diff line change 1
1
import React , { useEffect } from "react" ;
2
- // import { VANILLA_EMBED_JS } from "./constants";
2
+ import { VANILLA_EMBED_JS } from "./constants" ;
3
3
import { disableSidebarForRoute } from "@topcoder/micro-frontends-navbar-app" ;
4
4
import "styles/global.scss" ;
5
- import ebmedJs from "./embed-test" ;
5
+ // import ebmedJs from "./embed-test";
6
6
7
7
export default function Root ( ) {
8
8
useEffect ( ( ) => {
9
+ // ebmedJs();
9
10
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
+ } ;
19
18
} , [ ] ) ;
20
19
21
20
return (
You can’t perform that action at this time.
0 commit comments