Skip to content
This repository was archived by the owner on Mar 13, 2025. It is now read-only.

Commit 3b9b897

Browse files
authored
Merge pull request #186 from topcoder-platform/challenge-details-page
Changes from most recent challenge
2 parents a935fe2 + bf1864c commit 3b9b897

File tree

2 files changed

+19
-10
lines changed

2 files changed

+19
-10
lines changed

.circleci/config.yml

+1
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ workflows:
7777
branches:
7878
only:
7979
- dev
80+
- challenge-details-page
8081

8182
# Production builds are exectuted only on tagged commits to the
8283
# master branch.

src/App.jsx

+18-10
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,20 @@
22
* Main App component
33
*/
44
import React, { useLayoutEffect, useEffect, useRef } from "react";
5-
import { Router, useLocation, Redirect } from "@reach/router";
5+
import { Router, useLocation } from "@reach/router";
66
import { disableSidebarForRoute } from "@topcoder/micro-frontends-navbar-app";
77
import _ from "lodash";
88
import { usePreviousLocation } from "./utils/hooks";
9-
import Parcel from 'single-spa-react/parcel'
10-
import { useSelector } from 'react-redux'
11-
import ReactDOM from 'react-dom'
9+
import Parcel from "single-spa-react/parcel";
10+
import { useSelector } from "react-redux";
11+
import ReactDOM from "react-dom";
1212

1313
import "./styles/main.scss";
1414

15-
import Menu from './containers/Menu'
15+
import Menu from "./containers/Menu";
1616

1717
const App = () => {
18-
const menuVisible = useSelector(state => state.menu.show)
18+
const menuVisible = useSelector((state) => state.menu.show);
1919

2020
useLayoutEffect(() => {
2121
disableSidebarForRoute("/earn/*");
@@ -36,11 +36,19 @@ const App = () => {
3636

3737
return (
3838
<>
39-
{menuVisible && ReactDOM.createPortal(<Menu />, document.querySelector('#menu-id'))}
39+
{menuVisible &&
40+
ReactDOM.createPortal(<Menu />, document.querySelector("#menu-id"))}
4041
<Router>
41-
<Parcel path="/earn/find/challenges" config={() => System.import('@topcoder/micro-frontends-challenges-app')} />
42-
<Parcel path="/earn/my-gigs" config={() => System.import('@topcoder/micro-frontends-gigs-app')} />
43-
<Redirect from="/earn/*" to="/earn/find/challenges" noThrow />
42+
<Parcel
43+
path="/earn/find/challenges/*"
44+
config={() =>
45+
System.import("@topcoder/micro-frontends-challenges-app")
46+
}
47+
/>
48+
<Parcel
49+
path="/earn/my-gigs"
50+
config={() => System.import("@topcoder/micro-frontends-gigs-app")}
51+
/>
4452
</Router>
4553
</>
4654
);

0 commit comments

Comments
 (0)