routes.js 859 B

123456789101112131415161718192021
  1. import React from "react";
  2. import { IndexRoute, Route, Router, hashHistory as history } from "react-router";
  3. import ConfirmBattleContainer from "../containers/ConfirmBattleContainer";
  4. import Main from "../components/Main";
  5. import Home from "../components/Home";
  6. import PromptContainer from "../containers/PromptContainer";
  7. import ResultsContainer from "../containers/ResultsContainer";
  8. const routes = (
  9. <Router history={history}>
  10. <Route path="/" component={Main}>
  11. <IndexRoute component={Home} />
  12. <Route path="playerOne" component={PromptContainer} header="Player One" />
  13. <Route path="playerTwo/:playerOne" component={PromptContainer} header="Player Two" />
  14. <Route path="battle" component={ConfirmBattleContainer} />
  15. <Route path="results" component={ResultsContainer} />
  16. </Route>
  17. </Router>
  18. );
  19. export default routes;