1
0
mirror of https://github.com/ascribe/onion.git synced 2024-11-15 09:35:10 +01:00
onion/js/routes.js

41 lines
1.6 KiB
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-20 16:43:18 +02:00
import LoginContainer from './components/login_container';
import SignupContainer from './components/signup_container';
2015-06-15 16:56:17 +02:00
import PasswordResetContainer from './components/password_reset_container';
2015-06-20 16:43:18 +02:00
2015-06-17 17:48:23 +02:00
import SettingsContainer from './components/settings_container';
2015-06-25 14:39:39 +02:00
import CoaVerifyContainer from './components/coa_verify_container';
2015-06-09 17:53:44 +02:00
import AppConstants from './constants/application_constants';
2015-06-17 17:48:52 +02:00
import RegisterPiece from './components/register_piece';
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-19 17:16:01 +02:00
let routes = (
2015-06-09 16:10:25 +02:00
<Route name="app" path={baseUrl} handler={AscribeApp}>
2015-06-20 16:43:18 +02:00
<Route name="signup" path="signup" handler={SignupContainer} />
<Route name="login" path="login" handler={LoginContainer} />
2015-06-09 16:10:25 +02:00
<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:52 +02:00
<Route name="register_piece" path="register_piece" handler={RegisterPiece} />
2015-06-17 17:48:23 +02:00
<Route name="settings" path="settings" handler={SettingsContainer} />
2015-06-25 14:39:39 +02:00
<Route name="coa_verify" path="verify" handler={CoaVerifyContainer} />
2015-06-09 16:10:25 +02:00
2015-06-22 23:32:41 +02:00
<Redirect from={baseUrl} to="login" />
<Redirect from={baseUrl + '/'} to="login" />
2015-05-18 18:00:12 +02:00
</Route>
);
2015-05-18 18:00:12 +02:00
export default routes;