2015-06-05 11:06:36 +02:00
|
|
|
'use strict';
|
|
|
|
|
2015-05-18 13:43:42 +02:00
|
|
|
import React from 'react';
|
2015-05-18 09:56:16 +02:00
|
|
|
import Router from 'react-router';
|
|
|
|
|
|
|
|
import AscribeApp from './components/ascribe_app';
|
2015-05-19 17:13:09 +02:00
|
|
|
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-17 17:48:23 +02:00
|
|
|
import SettingsContainer from './components/settings_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-17 17:48:23 +02:00
|
|
|
<Route name="settings" path="settings" handler={SettingsContainer} />
|
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 13:43:42 +02:00
|
|
|
);
|
|
|
|
|
2015-05-18 18:00:12 +02:00
|
|
|
export default routes;
|