Skip to content
This repository was archived by the owner on Mar 13, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
CORE-287 remove routes and menu items
  • Loading branch information
kkartunov committed Feb 5, 2024
commit 71ca6d661207285ffe3ae1bf5e10a05c0956eaba
32 changes: 2 additions & 30 deletions src/App.jsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
/**
* Main App component
*/
import React, { useLayoutEffect, useEffect, useRef } from "react";
import { Router, useLocation, Redirect } from "@reach/router";
import { disableSidebarForRoute } from "@topcoder/mfe-header";
import React, { useEffect, useRef } from "react";
import { Router, useLocation } from "@reach/router";
import _ from "lodash";
import { usePreviousLocation } from "./utils/hooks";
import Parcel from "single-spa-react/parcel";
Expand All @@ -17,11 +16,6 @@ import Menu from "./containers/Menu";
const App = () => {
const menuVisible = useSelector((state) => state.menu.show);

useLayoutEffect(() => {
disableSidebarForRoute("/earn/*");
document.title = "Listings-EARN-Topcoder";
}, []);

const location = useLocation();
const previousLocation = usePreviousLocation();

Expand All @@ -39,33 +33,11 @@ const App = () => {
{menuVisible &&
ReactDOM.createPortal(<Menu />, document.querySelector("#menu-id"))}
<Router>
<Parcel
path="/earn/find/challenges/*"
config={() =>
System.import("@topcoder/micro-frontends-challenges-app")
}
/>
<Parcel
path="/earn/gigs/:externalId/apply"
view="gig-apply"
config={() => System.import("@topcoder/micro-frontends-gigs-app")}
/>
<Parcel
path="/earn/gigs/:externalId"
view="gig-details"
config={() => System.import("@topcoder/micro-frontends-gigs-app")}
/>
<Parcel
path="/earn/gigs"
view="gigs"
config={() => System.import("@topcoder/micro-frontends-gigs-app")}
/>
<Parcel
path="/earn/my-gigs"
view="my-gigs"
config={() => System.import("@topcoder/micro-frontends-gigs-app")}
/>
<Redirect from="/earn/*" to="/earn/find/challenges/" noThrow />
</Router>
</>
);
Expand Down
15 changes: 0 additions & 15 deletions src/constants/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,5 @@ export const NAV_MENU = {
},
],
},
{
name: "Find Work",
icon: "find-work.svg",
iconActive: "find-work-green.svg",
children: [
{
name: "Gigs",
path: "/earn/gigs",
},
{
name: "Challenges",
path: "/earn/find/challenges",
},
],
},
],
};