index.js 679 B

1234567891011121314151617181920
  1. import About from "./modules/About";
  2. import App from "./modules/App";
  3. import Home from "./modules/Home";
  4. import React from "react";
  5. import Repos from "./modules/Repos";
  6. import Repo from "./modules/Repo";
  7. import { render } from "react-dom";
  8. import { IndexRoute, Router, Route, browserHistory as history} from "react-router";
  9. render((
  10. <Router history={history}>
  11. <Route path="/" component={App}>
  12. <IndexRoute component={Home} />
  13. <Route path="/repos" component={Repos}>
  14. <Route path="/repos/:userName/:repoName" component={Repo} />
  15. </Route>
  16. <Route path="/about" component={About} />
  17. </Route>
  18. </Router>
  19. ), document.getElementById("app"));