Skip to content

Commit

Permalink
Reconfiguring React Router for gh-pages
Browse files Browse the repository at this point in the history
- Using HashRouter for gh-pages
  • Loading branch information
withoutwax committed Aug 20, 2019
1 parent 009a61d commit f847f16
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/App.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { BrowserRouter as Router, Route } from 'react-router-dom';
import { HashRouter, Route } from 'react-router-dom';
import './App.scss';

import Intro from './Components/Intro';
Expand All @@ -26,13 +26,13 @@ class App extends React.Component {

render() {
return (
<Router>
<HashRouter basename='/'>
<div className="App">
<Route exact path="/" component={Intro} />
<Route path="/setting/" render={(props) => <Setting parentCallbackState={this.updateGlobalState} {...props} />} />
<Route path="/game/" render={(props) => <Game globalState={this.state} {...props}/>} />
</div>
</Router>
</HashRouter>
)
};
}
Expand Down

0 comments on commit f847f16

Please sign in to comment.