Skip to content

Commit

Permalink
Merge pull request #607 from adamkendis/514-FRONT-routerFix
Browse files Browse the repository at this point in the history
React Router basename fix
  • Loading branch information
jmensch1 authored May 13, 2020
2 parents 19e3109 + f27ccde commit fd0277a
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 8 deletions.
1 change: 0 additions & 1 deletion .example.env
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
REACT_APP_MAPBOX_TOKEN=REDACTED
DB_URL=REDACTED
BASE_URL=/311-data
2 changes: 0 additions & 2 deletions .github/workflows/Continuous_Delivery.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ jobs:
run: |
echo REACT_APP_MAPBOX_TOKEN=${{ secrets.MAPBOX_TOKEN }} > .env
echo DB_URL=${{ secrets.DB_URL }} >> .env
echo BASE_URL=${{ secrets.BASE_URL }} >> .env
echo GITHUB_SHA=${{ github.sha }} >> .env
- name: Build project
run: npm run build
Expand All @@ -36,7 +35,6 @@ jobs:
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
REACT_APP_MAPBOX_TOKEN: ${{ secrets.MAPBOX_TOKEN }}
DB_URL: ${{ secrets.DB_URL }}
BASE_URL: ${{ secrets.BASE_URL }}
BASE_BRANCH: master # The branch the action should deploy from.
BRANCH: gh-pages # The branch the action should deploy to.
FOLDER: dist # The folder the action should deploy.
Expand Down
1 change: 0 additions & 1 deletion Orchestration/docker-compose-example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ services:
environment:
REACT_APP_MAPBOX_TOKEN: REDACTED
DB_URL: http://localhost:5000
BASE_URL: ''
ports:
- 3000:3000

Expand Down
1 change: 0 additions & 1 deletion copyEnv.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
echo REACT_APP_MAPBOX_TOKEN=$REACT_APP_MAPBOX_TOKEN > .env
echo DB_URL=$DB_URL >> .env
echo BASE_URL=$BASE_URL >> .env
webpack
node server.js
4 changes: 1 addition & 3 deletions src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ import Footer from './components/main/footer/Footer';
import StaticFooter from './components/main/footer/StaticFooter';
import { SnapshotRenderer } from './components/export/SnapshotService';

const basename = process.env.NODE_ENV === 'development' ? '/' : process.env.BASE_URL || '/';

const App = ({
getMetadata,
}) => {
Expand All @@ -21,7 +19,7 @@ const App = ({
});

return (
<Router basename={basename}>
<Router>
<Header />
<Routes />
<Switch>
Expand Down

0 comments on commit fd0277a

Please sign in to comment.