routes.js 736 B

12345678910111213141516171819
  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. const routes = (
  8. <Router history={history}>
  9. <Route path="/" component={Main}>
  10. <IndexRoute component={Home} />
  11. <Route path="playerOne" component={PromptContainer} header="Player One" />
  12. <Route path="playerTwo/:playerOne" component={PromptContainer} header="Player Two" />
  13. <Route path="battle" component={ConfirmBattleContainer} />
  14. </Route>
  15. </Router>
  16. );
  17. export default routes;