From 205f1a0197fce9d6fc4e798819e73ec2784bee84 Mon Sep 17 00:00:00 2001 From: Justin Gasper Date: Sat, 25 Sep 2021 09:25:43 +1000 Subject: [PATCH 1/3] Changes from most recent challenge https://software.topcoder.com/review/actions/ViewProjectDetails?pid=30209740 --- config/default.js | 2 +- src/App.jsx | 28 ++++++++++++++++++---------- 2 files changed, 19 insertions(+), 11 deletions(-) diff --git a/config/default.js b/config/default.js index ea788ff..889b8dc 100644 --- a/config/default.js +++ b/config/default.js @@ -2,7 +2,7 @@ require("dotenv").config(); module.exports = { MFE_CONFIG: { - '@topcoder/micro-frontends-challenges-app': 'https://platform.topcoder-dev.com/challenges-app/topcoder-micro-frontends-challenges-app.js', + '@topcoder/micro-frontends-challenges-app': 'http://localhost:8009/challenges-app/topcoder-micro-frontends-challenges-app.js', '@topcoder/micro-frontends-gigs-app': 'https://platform.topcoder-dev.com/gigs-app/topcoder-micro-frontends-gigs-app.js', } }; diff --git a/src/App.jsx b/src/App.jsx index fd3326d..feaab36 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -2,20 +2,20 @@ * Main App component */ import React, { useLayoutEffect, useEffect, useRef } from "react"; -import { Router, useLocation, Redirect } from "@reach/router"; +import { Router, useLocation } from "@reach/router"; import { disableSidebarForRoute } from "@topcoder/micro-frontends-navbar-app"; import _ from "lodash"; import { usePreviousLocation } from "./utils/hooks"; -import Parcel from 'single-spa-react/parcel' -import { useSelector } from 'react-redux' -import ReactDOM from 'react-dom' +import Parcel from "single-spa-react/parcel"; +import { useSelector } from "react-redux"; +import ReactDOM from "react-dom"; import "./styles/main.scss"; -import Menu from './containers/Menu' +import Menu from "./containers/Menu"; const App = () => { - const menuVisible = useSelector(state => state.menu.show) + const menuVisible = useSelector((state) => state.menu.show); useLayoutEffect(() => { disableSidebarForRoute("/earn/*"); @@ -36,11 +36,19 @@ const App = () => { return ( <> - {menuVisible && ReactDOM.createPortal(, document.querySelector('#menu-id'))} + {menuVisible && + ReactDOM.createPortal(, document.querySelector("#menu-id"))} - System.import('@topcoder/micro-frontends-challenges-app')} /> - System.import('@topcoder/micro-frontends-gigs-app')} /> - + + System.import("@topcoder/micro-frontends-challenges-app") + } + /> + System.import("@topcoder/micro-frontends-gigs-app")} + /> ); From bd04d342e8d34fcc63223e19308acf5edd50f446 Mon Sep 17 00:00:00 2001 From: Justin Gasper Date: Sat, 25 Sep 2021 13:29:42 +1000 Subject: [PATCH 2/3] Fix local config test --- config/default.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/default.js b/config/default.js index 889b8dc..ea788ff 100644 --- a/config/default.js +++ b/config/default.js @@ -2,7 +2,7 @@ require("dotenv").config(); module.exports = { MFE_CONFIG: { - '@topcoder/micro-frontends-challenges-app': 'http://localhost:8009/challenges-app/topcoder-micro-frontends-challenges-app.js', + '@topcoder/micro-frontends-challenges-app': 'https://platform.topcoder-dev.com/challenges-app/topcoder-micro-frontends-challenges-app.js', '@topcoder/micro-frontends-gigs-app': 'https://platform.topcoder-dev.com/gigs-app/topcoder-micro-frontends-gigs-app.js', } }; From bf1864c72932052eac7ecf9a9de9496af71d7a50 Mon Sep 17 00:00:00 2001 From: Sushil Shinde Date: Sun, 26 Sep 2021 10:42:24 +0530 Subject: [PATCH 3/3] ci: deploy on dev --- .circleci/config.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 0cb6119..8f2fb09 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -77,6 +77,7 @@ workflows: branches: only: - dev + - challenge-details-page # Production builds are exectuted only on tagged commits to the # master branch.