1
1
/**
2
2
* Main App component
3
3
*/
4
- import React , { useLayoutEffect , useEffect , useRef } from "react" ;
5
- import { Router , useLocation , Redirect } from "@reach/router" ;
6
- import { disableSidebarForRoute } from "@topcoder/mfe-header" ;
4
+ import React , { useEffect , useRef } from "react" ;
5
+ import { Router , useLocation } from "@reach/router" ;
7
6
import _ from "lodash" ;
8
7
import { usePreviousLocation } from "./utils/hooks" ;
9
8
import Parcel from "single-spa-react/parcel" ;
@@ -17,11 +16,6 @@ import Menu from "./containers/Menu";
17
16
const App = ( ) => {
18
17
const menuVisible = useSelector ( ( state ) => state . menu . show ) ;
19
18
20
- useLayoutEffect ( ( ) => {
21
- disableSidebarForRoute ( "/earn/*" ) ;
22
- document . title = "Listings-EARN-Topcoder" ;
23
- } , [ ] ) ;
24
-
25
19
const location = useLocation ( ) ;
26
20
const previousLocation = usePreviousLocation ( ) ;
27
21
@@ -39,33 +33,11 @@ const App = () => {
39
33
{ menuVisible &&
40
34
ReactDOM . createPortal ( < Menu /> , document . querySelector ( "#menu-id" ) ) }
41
35
< Router >
42
- < Parcel
43
- path = "/earn/find/challenges/*"
44
- config = { ( ) =>
45
- System . import ( "@topcoder/micro-frontends-challenges-app" )
46
- }
47
- />
48
- < Parcel
49
- path = "/earn/gigs/:externalId/apply"
50
- view = "gig-apply"
51
- config = { ( ) => System . import ( "@topcoder/micro-frontends-gigs-app" ) }
52
- />
53
- < Parcel
54
- path = "/earn/gigs/:externalId"
55
- view = "gig-details"
56
- config = { ( ) => System . import ( "@topcoder/micro-frontends-gigs-app" ) }
57
- />
58
- < Parcel
59
- path = "/earn/gigs"
60
- view = "gigs"
61
- config = { ( ) => System . import ( "@topcoder/micro-frontends-gigs-app" ) }
62
- />
63
36
< Parcel
64
37
path = "/earn/my-gigs"
65
38
view = "my-gigs"
66
39
config = { ( ) => System . import ( "@topcoder/micro-frontends-gigs-app" ) }
67
40
/>
68
- < Redirect from = "/earn/*" to = "/earn/find/challenges/" noThrow />
69
41
</ Router >
70
42
</ >
71
43
) ;
0 commit comments