Put basename into React Router

Also add fake api start command

Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
This commit is contained in:
Mcat12
2017-08-28 13:13:59 -04:00
parent 5565db0ef5
commit 391b702f5e
2 changed files with 4 additions and 1 deletions
+1
View File
@@ -26,6 +26,7 @@
},
"scripts": {
"start": "react-scripts start",
"start-fake": "REACT_APP_FAKE_API=1 react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test --env=jsdom",
"eject": "react-scripts eject"
+3 -1
View File
@@ -7,9 +7,11 @@ import Full from './containers/Full'
const history = createBrowserHistory();
console.log(process.env.PUBLIC_URL);
ReactDOM.render(
(
<HashRouter history={history}>
<HashRouter basename={process.env.PUBLIC_URL} history={history}>
<Switch>
<Route path="/" name="Home" component={Full}/>
</Switch>