1
0
mirror of https://github.com/ascribe/onion.git synced 2024-12-23 01:39:36 +01:00
onion/js/routes.js

30 lines
1013 B
JavaScript
Raw Normal View History

'use strict';
import React from 'react';
2015-05-18 09:56:16 +02:00
import Router from 'react-router';
import AscribeApp from './components/ascribe_app';
import PieceList from './components/piece_list';
2015-05-26 13:48:46 +02:00
import EditionContainer from './components/edition_container';
2015-06-15 16:56:17 +02:00
import PasswordResetContainer from './components/password_reset_container';
2015-06-09 17:53:44 +02:00
import AppConstants from './constants/application_constants';
2015-06-15 16:56:17 +02:00
//import LoginModalHandler from './components/login_modal_handler';
2015-06-09 17:53:44 +02:00
2015-05-19 17:16:01 +02:00
let Route = Router.Route;
2015-06-09 16:10:25 +02:00
let Redirect = Router.Redirect;
2015-06-09 17:53:44 +02:00
let baseUrl = AppConstants.baseUrl;
2015-05-18 09:56:16 +02:00
2015-05-20 16:44:45 +02:00
2015-05-19 17:16:01 +02:00
let routes = (
2015-06-09 16:10:25 +02:00
<Route name="app" path={baseUrl} handler={AscribeApp}>
<Route name="pieces" path="collection" handler={PieceList} />
<Route name="edition" path="editions/:editionId" handler={EditionContainer} />
2015-06-15 16:56:17 +02:00
<Route name="password_reset" path="password_reset" handler={PasswordResetContainer} />
2015-06-09 16:10:25 +02:00
<Redirect from={baseUrl} to="pieces" />
<Redirect from={baseUrl + '/'} to="pieces" />
2015-05-18 18:00:12 +02:00
</Route>
);
2015-05-18 18:00:12 +02:00
export default routes;