Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
29 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import React from 'react'; | ||
|
||
class Home extends React.Component { | ||
|
||
render() { | ||
return (<div>Home</div>); | ||
} | ||
|
||
} | ||
|
||
export default Home; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,24 @@ | ||
import React from 'react'; | ||
import ReactDOM from 'react-dom'; | ||
import { Router, Route, hashHistory } from 'react-router'; | ||
import { Router, Route, hashHistory, IndexRoute } from 'react-router'; | ||
|
||
import App from './components/app'; | ||
import About from './components/about'; | ||
import Repos from './components/repos'; | ||
import Repo from './components/repo' | ||
import Repo from './components/repo'; | ||
import Home from './components/home'; | ||
|
||
require('../node_modules/bootstrap/dist/css/bootstrap.css'); | ||
require('./index.css'); | ||
|
||
ReactDOM.render(( | ||
<Router history={hashHistory}> | ||
<Route path="/" component={App}> | ||
<Route path="/repos" component={Repos}> | ||
<Route path="/repos/:userName/:repoName" component={Repo} /> | ||
</Route> | ||
<Route path="/about" component={About} /> | ||
<Router history={hashHistory}> | ||
<Route path="/" component={App}> | ||
<IndexRoute component={Home} /> | ||
<Route path="/repos" component={Repos}> | ||
<Route path="/repos/:userName/:repoName" component={Repo} /> | ||
</Route> | ||
</Router> | ||
), | ||
document.body.appendChild(document.createElement('div')) | ||
); | ||
<Route path="/about" component={About} /> | ||
</Route> | ||
</Router> | ||
), document.body.appendChild(document.createElement('div'))); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters