1
0
mirror of https://github.com/ascribe/onion.git synced 2024-11-16 01:55:07 +01:00
onion/js/components/whitelabel/prize/prize_routes.js

62 lines
2.6 KiB
JavaScript
Raw Normal View History

'use strict';
import React from 'react';
import { Route, IndexRoute } from 'react-router';
import Landing from './components/prize_landing';
import LoginContainer from './components/prize_login_container';
2015-07-17 15:02:44 +02:00
import LogoutContainer from '../../../components/logout_container';
import SignupContainer from './components/prize_signup_container';
2015-07-13 19:53:16 +02:00
import PasswordResetContainer from '../../../components/password_reset_container';
import PrizeRegisterPiece from './components/prize_register_piece';
import PrizePieceList from './components/prize_piece_list';
import PrizePieceContainer from './components/ascribe_detail/prize_piece_container';
2015-07-13 23:29:07 +02:00
import EditionContainer from '../../ascribe_detail/edition_container';
import SettingsContainer from './components/prize_settings_container';
import CoaVerifyContainer from '../../../components/coa_verify_container';
import ErrorNotFoundPage from '../../../components/error_not_found_page';
import App from './prize_app';
import AuthProxyHandler from '../../../components/ascribe_routes/proxy_routes/auth_proxy_handler';
2015-07-31 13:44:57 +02:00
function getRoutes() {
return (
2015-10-13 14:19:08 +02:00
<Route path='/' component={App}>
<IndexRoute component={Landing} />
2015-10-12 16:51:03 +02:00
<Route
path='login'
component={AuthProxyHandler({to: '/collection', when: 'loggedIn'})(LoginContainer)} />
2015-10-12 16:51:03 +02:00
<Route
path='logout'
component={AuthProxyHandler({to: '/', when: 'loggedOut'})(LogoutContainer)}/>
2015-10-12 16:51:03 +02:00
<Route
path='signup'
component={AuthProxyHandler({to: '/collection', when: 'loggedIn'})(SignupContainer)} />
2015-10-12 16:51:03 +02:00
<Route
path='password_reset'
component={AuthProxyHandler({to: '/collection', when: 'loggedIn'})(PasswordResetContainer)} />
2015-10-12 16:51:03 +02:00
<Route
path='settings'
component={AuthProxyHandler({to: '/login', when: 'loggedOut'})(SettingsContainer)}/>
2015-10-12 16:51:03 +02:00
<Route
path='register_piece'
component={AuthProxyHandler({to: '/login', when: 'loggedOut'})(PrizeRegisterPiece)}
2015-10-12 16:51:03 +02:00
headerTitle='+ NEW WORK'/>
<Route
path='collection'
component={AuthProxyHandler({to: '/login', when: 'loggedOut'})(PrizePieceList)}
2015-10-12 16:51:03 +02:00
headerTitle='COLLECTION'/>
2015-10-12 16:51:03 +02:00
<Route path='pieces/:pieceId' component={PrizePieceContainer} />
<Route path='editions/:editionId' component={EditionContainer} />
<Route path='verify' component={CoaVerifyContainer} />
<Route path='*' component={ErrorNotFoundPage} />
</Route>
);
}
2015-10-12 16:51:03 +02:00
export default getRoutes;