mirror of
https://github.com/gosticks/web.git
synced 2026-10-06 22:57:01 +00:00
Put basename into React Router
Also add fake api start command Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
This commit is contained in:
@@ -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
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user