1
0
mirror of https://github.com/ascribe/onion.git synced 2025-01-05 11:25:09 +01:00
onion/js/components/whitelabel/wallet/wallet_routes.js

459 lines
22 KiB
JavaScript
Raw Permalink Normal View History

import React from 'react';
import IndexRoute from 'react-router/es6/IndexRoute';
import Route from 'react-router/es6/Route';
2016-02-08 14:50:24 +01:00
import { ProxyHandler, AuthRedirect } from '../../../components/ascribe_routes/proxy_handler';
// General components
import CoaVerifyContainer from '../../../components/coa_verify_container';
import LoginContainer from '../../../components/login_container';
import LogoutContainer from '../../../components/logout_container';
import SignupContainer from '../../../components/signup_container';
import PasswordResetContainer from '../../../components/password_reset_container';
import PieceList from '../../../components/piece_list';
import PieceContainer from '../../../components/ascribe_detail/piece_container';
import EditionContainer from '../../../components/ascribe_detail/edition_container';
import SettingsContainer from '../../../components/ascribe_settings/settings_container';
import ContractSettings from '../../../components/ascribe_settings/contract_settings';
import ErrorNotFoundPage from '../../../components/error_not_found_page';
import CCRegisterPiece from './components/cc/cc_register_piece';
2015-08-19 09:31:36 +02:00
import CylandLanding from './components/cyland/cyland_landing';
import CylandPieceContainer from './components/cyland/cyland_detail/cyland_piece_container';
2015-08-12 09:30:24 +02:00
import CylandRegisterPiece from './components/cyland/cyland_register_piece';
import CylandPieceList from './components/cyland/cyland_piece_list';
import IkonotvLanding from './components/ikonotv/ikonotv_landing';
import IkonotvPieceList from './components/ikonotv/ikonotv_piece_list';
import SendContractAgreementForm from '../../../components/ascribe_forms/form_send_contract_agreement';
2015-09-15 13:15:29 +02:00
import IkonotvRegisterPiece from './components/ikonotv/ikonotv_register_piece';
import IkonotvPieceContainer from './components/ikonotv/ikonotv_detail/ikonotv_piece_container';
2015-09-04 11:49:55 +02:00
import IkonotvContractNotifications from './components/ikonotv/ikonotv_contract_notifications';
2016-04-06 16:22:03 +02:00
import MarketLanding from './components/market/market_landing';
import MarketPieceList from './components/market/market_piece_list';
import MarketRegisterPiece from './components/market/market_register_piece';
import MarketPieceContainer from './components/market/market_detail/market_piece_container';
import MarketEditionContainer from './components/market/market_detail/market_edition_container';
2016-03-07 13:45:40 +01:00
import MarketFooter from './components/market/market_footer';
2015-10-21 17:37:29 +02:00
import LumenusLanding from './components/lumenus/lumenus_landing';
2015-12-02 19:31:50 +01:00
import Vivi23Landing from './components/23vivi/23vivi_landing';
import Vivi23PieceList from './components/23vivi/23vivi_piece_list';
import PollineLanding from './components/polline/polline_landing';
import ArtcityLanding from './components/artcity/artcity_landing';
import WalletApp from './wallet_app';
import { getLangText } from '../../../utils/lang';
2016-02-08 14:50:24 +01:00
2016-06-03 17:52:38 +02:00
const ROUTES = {
'cyland': (
2016-06-03 17:52:38 +02:00
<Route path="/" component={WalletApp}>
2016-02-05 10:38:59 +01:00
<IndexRoute
2016-06-03 17:52:38 +02:00
component={ProxyHandler(AuthRedirect({ to: '/collection', when: 'loggedIn' }))(CylandLanding)} />
2015-10-12 16:51:03 +02:00
<Route
2016-06-03 17:52:38 +02:00
path="login"
component={ProxyHandler(AuthRedirect({ to: '/collection', when: 'loggedIn' }))(LoginContainer)} />
2015-10-12 16:51:03 +02:00
<Route
2016-06-03 17:52:38 +02:00
path="logout"
component={ProxyHandler(AuthRedirect({ to: '/', when: 'loggedOut' }))(LogoutContainer)} />
2015-10-12 16:51:03 +02:00
<Route
2016-06-03 17:52:38 +02:00
path="signup"
component={ProxyHandler(AuthRedirect({ to: '/collection', when: 'loggedIn' }))(SignupContainer)} />
2015-10-12 16:51:03 +02:00
<Route
2016-06-03 17:52:38 +02:00
path="password_reset"
component={ProxyHandler(AuthRedirect({ to: '/collection', when: 'loggedIn' }))(PasswordResetContainer)} />
2015-10-12 16:51:03 +02:00
<Route
2016-06-03 17:52:38 +02:00
path="settings"
component={ProxyHandler(AuthRedirect({ to: '/login', when: 'loggedOut' }))(SettingsContainer)} />
2015-10-12 16:51:03 +02:00
<Route
2016-06-03 17:52:38 +02:00
path="contract_settings"
component={ProxyHandler(AuthRedirect({ to: '/login', when: 'loggedOut' }))(ContractSettings)} />
2015-10-12 16:51:03 +02:00
<Route
2016-06-03 17:52:38 +02:00
path="register_piece"
component={ProxyHandler(AuthRedirect({ to: '/login', when: 'loggedOut' }))(CylandRegisterPiece)}
2016-02-08 14:50:24 +01:00
headerTitle={getLangText('+ NEW WORK')}
2016-06-03 17:52:38 +02:00
aclName="acl_wallet_submit" />
2015-10-12 16:51:03 +02:00
<Route
2016-06-03 17:52:38 +02:00
path="collection"
component={ProxyHandler(AuthRedirect({ to: '/login', when: 'loggedOut' }))(CylandPieceList)}
2016-02-08 14:50:24 +01:00
headerTitle={getLangText('COLLECTION')}
2016-06-03 17:52:38 +02:00
disableOn="noPieces" />
2016-02-05 10:38:59 +01:00
<Route
2016-06-03 17:52:38 +02:00
path="editions/:editionId"
2016-03-04 15:53:55 +01:00
component={EditionContainer} />
2016-02-05 10:38:59 +01:00
<Route
2016-06-03 17:52:38 +02:00
path="coa_verify"
2016-03-04 15:53:55 +01:00
component={CoaVerifyContainer} />
2016-02-05 10:38:59 +01:00
<Route
2016-06-03 17:52:38 +02:00
path="pieces/:pieceId"
2016-03-04 15:53:55 +01:00
component={CylandPieceContainer} />
2016-02-05 10:38:59 +01:00
<Route
2016-06-03 17:52:38 +02:00
path="*"
2016-03-04 15:53:55 +01:00
component={ErrorNotFoundPage} />
</Route>
),
'cc': (
2016-06-03 17:52:38 +02:00
<Route path="/" component={WalletApp}>
2015-10-12 16:51:03 +02:00
<Route
2016-06-03 17:52:38 +02:00
path="login"
component={ProxyHandler(AuthRedirect({ to: '/collection', when: 'loggedIn' }))(LoginContainer)} />
2015-10-12 16:51:03 +02:00
<Route
2016-06-03 17:52:38 +02:00
path="logout"
component={ProxyHandler(AuthRedirect({ to: '/', when: 'loggedOut' }))(LogoutContainer)} />
2015-10-12 16:51:03 +02:00
<Route
2016-06-03 17:52:38 +02:00
path="signup"
component={ProxyHandler(AuthRedirect({ to: '/collection', when: 'loggedIn' }))(SignupContainer)} />
2015-10-12 16:51:03 +02:00
<Route
2016-06-03 17:52:38 +02:00
path="password_reset"
component={ProxyHandler(AuthRedirect({ to: '/collection', when: 'loggedIn' }))(PasswordResetContainer)} />
2015-10-12 16:51:03 +02:00
<Route
2016-06-03 17:52:38 +02:00
path="settings"
component={ProxyHandler(AuthRedirect({ to: '/login', when: 'loggedOut' }))(SettingsContainer)} />
2015-10-12 16:51:03 +02:00
<Route
2016-06-03 17:52:38 +02:00
path="contract_settings"
component={ProxyHandler(AuthRedirect({ to: '/login', when: 'loggedOut' }))(ContractSettings)} />
2015-10-12 16:51:03 +02:00
<Route
2016-06-03 17:52:38 +02:00
path="register_piece"
component={ProxyHandler(AuthRedirect({ to: '/login', when: 'loggedOut' }))(CCRegisterPiece)}
2016-03-04 15:53:55 +01:00
headerTitle={getLangText('+ NEW WORK')} />
2015-10-12 16:51:03 +02:00
<Route
2016-06-03 17:52:38 +02:00
path="collection"
component={ProxyHandler(AuthRedirect({ to: '/login', when: 'loggedOut' }))(PieceList)}
2016-02-08 14:50:24 +01:00
headerTitle={getLangText('COLLECTION')}
2016-06-03 17:52:38 +02:00
disableOn="noPieces" />
2016-02-05 10:38:59 +01:00
<Route
2016-06-03 17:52:38 +02:00
path="pieces/:pieceId"
2016-03-04 15:53:55 +01:00
component={PieceContainer} />
2016-02-05 10:38:59 +01:00
<Route
2016-06-03 17:52:38 +02:00
path="editions/:editionId"
2016-03-04 15:53:55 +01:00
component={EditionContainer} />
2016-02-05 10:38:59 +01:00
<Route
2016-06-03 17:52:38 +02:00
path="coa_verify"
2016-03-04 15:53:55 +01:00
component={CoaVerifyContainer} />
2016-02-05 10:38:59 +01:00
<Route
2016-06-03 17:52:38 +02:00
path="*"
2016-03-04 15:53:55 +01:00
component={ErrorNotFoundPage} />
</Route>
2015-08-18 12:08:01 +02:00
),
'ikonotv': (
2016-06-03 17:52:38 +02:00
<Route path="/" component={WalletApp}>
2016-02-05 10:38:59 +01:00
<IndexRoute
2016-06-03 17:52:38 +02:00
component={ProxyHandler(AuthRedirect({ to: '/collection', when: 'loggedIn' }))(IkonotvLanding)} />
2015-10-12 16:51:03 +02:00
<Route
2016-06-03 17:52:38 +02:00
path="login"
component={ProxyHandler(AuthRedirect({ to: '/collection', when: 'loggedIn' }))(LoginContainer)} />
2015-10-12 16:51:03 +02:00
<Route
2016-06-03 17:52:38 +02:00
path="logout"
component={ProxyHandler(AuthRedirect({ to: '/', when: 'loggedOut' }))(LogoutContainer)} />
2015-10-12 16:51:03 +02:00
<Route
2016-06-03 17:52:38 +02:00
path="signup"
component={ProxyHandler(AuthRedirect({ to: '/collection', when: 'loggedIn' }))(SignupContainer)} />
2015-10-12 16:51:03 +02:00
<Route
2016-06-03 17:52:38 +02:00
path="password_reset"
component={ProxyHandler(AuthRedirect({ to: '/collection', when: 'loggedIn' }))(PasswordResetContainer)} />
2015-10-12 16:51:03 +02:00
<Route
2016-06-03 17:52:38 +02:00
path="settings"
component={ProxyHandler(AuthRedirect({ to: '/login', when: 'loggedOut' }))(SettingsContainer)} />
2015-10-12 16:51:03 +02:00
<Route
2016-06-03 17:52:38 +02:00
path="contract_settings"
component={ProxyHandler(AuthRedirect({ to: '/login', when: 'loggedOut' }))(ContractSettings)} />
2015-10-12 16:51:03 +02:00
<Route
2016-06-03 17:52:38 +02:00
path="request_loan"
component={ProxyHandler(AuthRedirect({ to: '/login', when: 'loggedOut' }))(SendContractAgreementForm)}
2016-02-08 14:50:24 +01:00
headerTitle={getLangText('SEND NEW CONTRACT')}
2016-06-03 17:52:38 +02:00
aclName="acl_create_contractagreement" />
2015-10-12 16:51:03 +02:00
<Route
2016-06-03 17:52:38 +02:00
path="register_piece"
component={ProxyHandler(AuthRedirect({ to: '/login', when: 'loggedOut' }))(IkonotvRegisterPiece)}
2016-02-08 14:50:24 +01:00
headerTitle={getLangText('+ NEW WORK')}
2016-06-03 17:52:38 +02:00
aclName="acl_wallet_submit" />
2015-10-12 16:51:03 +02:00
<Route
2016-06-03 17:52:38 +02:00
path="collection"
component={ProxyHandler(AuthRedirect({ to: '/login', when: 'loggedOut' }))(IkonotvPieceList)}
2016-02-08 14:50:24 +01:00
headerTitle={getLangText('COLLECTION')}
2016-06-03 17:52:38 +02:00
disableOn="noPieces" />
2015-10-12 16:51:03 +02:00
<Route
2016-06-03 17:52:38 +02:00
path="contract_notifications"
component={ProxyHandler(AuthRedirect({ to: '/login', when: 'loggedOut' }))(IkonotvContractNotifications)} />
2016-02-05 10:38:59 +01:00
<Route
2016-06-03 17:52:38 +02:00
path="pieces/:pieceId"
2016-03-04 15:53:55 +01:00
component={IkonotvPieceContainer} />
2016-02-05 10:38:59 +01:00
<Route
2016-06-03 17:52:38 +02:00
path="editions/:editionId"
2016-03-04 15:53:55 +01:00
component={EditionContainer} />
2016-02-05 10:38:59 +01:00
<Route
2016-06-03 17:52:38 +02:00
path="coa_verify"
2016-03-04 15:53:55 +01:00
component={CoaVerifyContainer} />
2016-02-05 10:38:59 +01:00
<Route
2016-06-03 17:52:38 +02:00
path="*"
2016-03-04 15:53:55 +01:00
component={ErrorNotFoundPage} />
2015-08-18 12:08:01 +02:00
</Route>
),
'lumenus': (
2016-06-03 17:52:38 +02:00
<Route path="/" component={WalletApp}>
2016-02-05 10:38:59 +01:00
<IndexRoute
2016-06-03 17:52:38 +02:00
component={ProxyHandler(AuthRedirect({ to: '/collection', when: 'loggedIn' }))(LumenusLanding)} />
<Route
2016-06-03 17:52:38 +02:00
path="login"
component={ProxyHandler(AuthRedirect({ to: '/collection', when: 'loggedIn' }))(LoginContainer)} />
<Route
2016-06-03 17:52:38 +02:00
path="logout"
component={ProxyHandler(AuthRedirect({ to: '/', when: 'loggedOut' }))(LogoutContainer)} />
<Route
2016-06-03 17:52:38 +02:00
path="signup"
component={ProxyHandler(AuthRedirect({ to: '/collection', when: 'loggedIn' }))(SignupContainer)} />
<Route
2016-06-03 17:52:38 +02:00
path="password_reset"
component={ProxyHandler(AuthRedirect({ to: '/collection', when: 'loggedIn' }))(PasswordResetContainer)} />
<Route
2016-06-03 17:52:38 +02:00
path="settings"
component={ProxyHandler(AuthRedirect({ to: '/login', when: 'loggedOut' }))(SettingsContainer)} />
<Route
2016-06-03 17:52:38 +02:00
path="contract_settings"
component={ProxyHandler(AuthRedirect({ to: '/login', when: 'loggedOut' }))(ContractSettings)} />
<Route
2016-06-03 17:52:38 +02:00
path="register_piece"
component={ProxyHandler(AuthRedirect({ to: '/login', when: 'loggedOut' }))(MarketRegisterPiece)}
2016-02-08 14:50:24 +01:00
headerTitle={getLangText('+ NEW WORK')}
2016-06-03 17:52:38 +02:00
aclName="acl_wallet_submit" />
<Route
2016-06-03 17:52:38 +02:00
path="collection"
component={ProxyHandler(AuthRedirect({ to: '/login', when: 'loggedOut' }))(MarketPieceList)}
2016-02-08 14:50:24 +01:00
headerTitle={getLangText('COLLECTION')}
2016-06-03 17:52:38 +02:00
disableOn="noPieces" />
2016-02-05 10:38:59 +01:00
<Route
2016-06-03 17:52:38 +02:00
path="pieces/:pieceId"
2016-03-04 15:53:55 +01:00
component={MarketPieceContainer} />
2016-02-05 10:38:59 +01:00
<Route
2016-06-03 17:52:38 +02:00
path="editions/:editionId"
2016-03-04 15:53:55 +01:00
component={MarketEditionContainer} />
2016-02-05 10:38:59 +01:00
<Route
2016-06-03 17:52:38 +02:00
path="coa_verify"
2016-03-04 15:53:55 +01:00
component={CoaVerifyContainer} />
2016-02-05 10:38:59 +01:00
<Route
2016-06-03 17:52:38 +02:00
path="*"
2016-03-04 15:53:55 +01:00
component={ErrorNotFoundPage} />
</Route>
2015-11-24 12:08:37 +01:00
),
'23vivi': (
2016-06-03 17:52:38 +02:00
<Route path="/" component={WalletApp}>
<IndexRoute component={ProxyHandler(AuthRedirect({ to: '/collection', when: 'loggedIn' }))(Vivi23Landing)} />
2015-11-24 12:08:37 +01:00
<Route
2016-06-03 17:52:38 +02:00
path="login"
component={ProxyHandler(AuthRedirect({ to: '/collection', when: 'loggedIn' }))(LoginContainer)}
2016-03-07 13:45:40 +01:00
footer={MarketFooter} />
2015-11-24 12:08:37 +01:00
<Route
2016-06-03 17:52:38 +02:00
path="logout"
component={ProxyHandler(AuthRedirect({ to: '/', when: 'loggedOut' }))(LogoutContainer)}
2016-03-07 13:45:40 +01:00
footer={MarketFooter} />
2015-11-24 12:08:37 +01:00
<Route
2016-06-03 17:52:38 +02:00
path="signup"
component={ProxyHandler(AuthRedirect({ to: '/collection', when: 'loggedIn' }))(SignupContainer)}
2016-03-07 13:45:40 +01:00
footer={MarketFooter} />
2015-11-24 12:08:37 +01:00
<Route
2016-06-03 17:52:38 +02:00
path="password_reset"
component={ProxyHandler(AuthRedirect({ to: '/collection', when: 'loggedIn' }))(PasswordResetContainer)}
2016-03-07 13:45:40 +01:00
footer={MarketFooter} />
2015-11-24 12:08:37 +01:00
<Route
2016-06-03 17:52:38 +02:00
path="settings"
component={ProxyHandler(AuthRedirect({ to: '/login', when: 'loggedOut' }))(SettingsContainer)}
2016-03-07 13:45:40 +01:00
footer={MarketFooter} />
2015-11-24 12:08:37 +01:00
<Route
2016-06-03 17:52:38 +02:00
path="contract_settings"
component={ProxyHandler(AuthRedirect({ to: '/login', when: 'loggedOut' }))(ContractSettings)}
2016-03-07 13:45:40 +01:00
footer={MarketFooter} />
2015-11-24 12:08:37 +01:00
<Route
2016-06-03 17:52:38 +02:00
path="register_piece"
component={ProxyHandler(AuthRedirect({ to: '/login', when: 'loggedOut' }))(MarketRegisterPiece)}
2016-02-08 14:50:24 +01:00
headerTitle={getLangText('+ NEW WORK')}
2016-06-03 17:52:38 +02:00
aclName="acl_wallet_submit"
2016-03-07 13:45:40 +01:00
footer={MarketFooter} />
2015-11-24 12:08:37 +01:00
<Route
2016-06-03 17:52:38 +02:00
path="collection"
component={ProxyHandler(AuthRedirect({ to: '/login', when: 'loggedOut' }))(Vivi23PieceList)}
2016-02-08 14:50:24 +01:00
headerTitle={getLangText('COLLECTION')}
2016-06-03 17:52:38 +02:00
disableOn="noPieces"
2016-03-07 13:45:40 +01:00
footer={MarketFooter} />
2016-02-05 10:38:59 +01:00
<Route
2016-06-03 17:52:38 +02:00
path="pieces/:pieceId"
2016-03-07 13:45:40 +01:00
component={MarketPieceContainer}
footer={MarketFooter} />
2016-02-05 10:38:59 +01:00
<Route
2016-06-03 17:52:38 +02:00
path="editions/:editionId"
2016-03-07 13:45:40 +01:00
component={MarketEditionContainer}
footer={MarketFooter} />
2016-02-05 10:38:59 +01:00
<Route
2016-06-03 17:52:38 +02:00
path="coa_verify"
2016-03-07 13:45:40 +01:00
component={CoaVerifyContainer}
footer={MarketFooter} />
2016-02-05 10:38:59 +01:00
<Route
2016-06-03 17:52:38 +02:00
path="*"
2016-03-07 13:45:40 +01:00
component={ErrorNotFoundPage}
footer={MarketFooter} />
</Route>
),
'polline': (
2016-06-03 17:52:38 +02:00
<Route path="/" component={WalletApp}>
<IndexRoute component={ProxyHandler(AuthRedirect({ to: '/collection', when: 'loggedIn' }))(PollineLanding)} />
<Route
2016-06-03 17:52:38 +02:00
path="login"
component={ProxyHandler(AuthRedirect({ to: '/collection', when: 'loggedIn' }))(LoginContainer)} />
<Route
2016-06-03 17:52:38 +02:00
path="logout"
component={ProxyHandler(AuthRedirect({ to: '/', when: 'loggedOut' }))(LogoutContainer)} />
<Route
2016-06-03 17:52:38 +02:00
path="signup"
component={ProxyHandler(AuthRedirect({ to: '/collection', when: 'loggedIn' }))(SignupContainer)} />
<Route
2016-06-03 17:52:38 +02:00
path="password_reset"
component={ProxyHandler(AuthRedirect({ to: '/collection', when: 'loggedIn' }))(PasswordResetContainer)} />
<Route
2016-06-03 17:52:38 +02:00
path="settings"
component={ProxyHandler(AuthRedirect({ to: '/login', when: 'loggedOut' }))(SettingsContainer)} />
<Route
2016-06-03 17:52:38 +02:00
path="contract_settings"
component={ProxyHandler(AuthRedirect({ to: '/login', when: 'loggedOut' }))(ContractSettings)} />
<Route
2016-06-03 17:52:38 +02:00
path="register_piece"
component={ProxyHandler(AuthRedirect({ to: '/login', when: 'loggedOut' }))(MarketRegisterPiece)}
2016-02-08 14:50:24 +01:00
headerTitle={getLangText('+ NEW WORK')}
2016-06-03 17:52:38 +02:00
aclName="acl_wallet_submit" />
<Route
2016-06-03 17:52:38 +02:00
path="collection"
component={ProxyHandler(AuthRedirect({ to: '/login', when: 'loggedOut' }))(MarketPieceList)}
2016-02-08 14:50:24 +01:00
headerTitle={getLangText('COLLECTION')}
2016-06-03 17:52:38 +02:00
disableOn="noPieces" />
<Route path="pieces/:pieceId" component={MarketPieceContainer} />
<Route path="editions/:editionId" component={MarketEditionContainer} />
<Route path="verify" component={CoaVerifyContainer} />
<Route path="*" component={ErrorNotFoundPage} />
</Route>
),
'artcity': (
2016-06-03 17:52:38 +02:00
<Route path="/" component={WalletApp}>
<IndexRoute component={ProxyHandler(AuthRedirect({ to: '/collection', when: 'loggedIn' }))(ArtcityLanding)} />
<Route
2016-06-03 17:52:38 +02:00
path="login"
component={ProxyHandler(AuthRedirect({ to: '/collection', when: 'loggedIn' }))(LoginContainer)} />
2016-02-24 11:16:56 +01:00
<Route
2016-06-03 17:52:38 +02:00
path="logout"
component={ProxyHandler(AuthRedirect({ to: '/', when: 'loggedOut' }))(LogoutContainer)} />
2016-02-24 11:16:56 +01:00
<Route
2016-06-03 17:52:38 +02:00
path="signup"
component={ProxyHandler(AuthRedirect({ to: '/collection', when: 'loggedIn' }))(SignupContainer)} />
2016-02-24 11:16:56 +01:00
<Route
2016-06-03 17:52:38 +02:00
path="password_reset"
component={ProxyHandler(AuthRedirect({ to: '/collection', when: 'loggedIn' }))(PasswordResetContainer)} />
2016-02-24 11:16:56 +01:00
<Route
2016-06-03 17:52:38 +02:00
path="settings"
component={ProxyHandler(AuthRedirect({ to: '/login', when: 'loggedOut' }))(SettingsContainer)} />
2016-02-24 11:16:56 +01:00
<Route
2016-06-03 17:52:38 +02:00
path="contract_settings"
component={ProxyHandler(AuthRedirect({ to: '/login', when: 'loggedOut' }))(ContractSettings)} />
2016-02-24 11:16:56 +01:00
<Route
2016-06-03 17:52:38 +02:00
path="register_piece"
component={ProxyHandler(AuthRedirect({ to: '/login', when: 'loggedOut' }))(MarketRegisterPiece)}
2016-02-24 11:16:56 +01:00
headerTitle={getLangText('+ NEW WORK')}
2016-06-03 17:52:38 +02:00
aclName="acl_wallet_submit" />
2016-02-24 11:16:56 +01:00
<Route
2016-06-03 17:52:38 +02:00
path="collection"
component={ProxyHandler(AuthRedirect({ to: '/login', when: 'loggedOut' }))(MarketPieceList)}
2016-02-24 11:16:56 +01:00
headerTitle={getLangText('COLLECTION')}
2016-06-03 17:52:38 +02:00
disableOn="noPieces" />
<Route path="pieces/:pieceId" component={MarketPieceContainer} />
<Route path="editions/:editionId" component={MarketEditionContainer} />
<Route path="verify" component={CoaVerifyContainer} />
<Route path="*" component={ErrorNotFoundPage} />
2016-02-24 11:16:56 +01:00
</Route>
),
'demo': (
2016-06-03 17:52:38 +02:00
<Route path="/" component={WalletApp}>
<IndexRoute component={ProxyHandler(AuthRedirect({ to: '/collection', when: 'loggedIn' }))(MarketLanding)} />
2016-04-06 16:22:03 +02:00
<Route
2016-06-03 17:52:38 +02:00
path="login"
component={ProxyHandler(AuthRedirect({ to: '/collection', when: 'loggedIn' }))(LoginContainer)} />
2016-04-06 16:22:03 +02:00
<Route
2016-06-03 17:52:38 +02:00
path="logout"
component={ProxyHandler(AuthRedirect({ to: '/', when: 'loggedOut' }))(LogoutContainer)} />
2016-04-06 16:22:03 +02:00
<Route
2016-06-03 17:52:38 +02:00
path="signup"
component={ProxyHandler(AuthRedirect({ to: '/collection', when: 'loggedIn' }))(SignupContainer)} />
2016-04-06 16:22:03 +02:00
<Route
2016-06-03 17:52:38 +02:00
path="password_reset"
component={ProxyHandler(AuthRedirect({ to: '/collection', when: 'loggedIn' }))(PasswordResetContainer)} />
2016-04-06 16:22:03 +02:00
<Route
2016-06-03 17:52:38 +02:00
path="settings"
component={ProxyHandler(AuthRedirect({ to: '/login', when: 'loggedOut' }))(SettingsContainer)} />
2016-04-06 16:22:03 +02:00
<Route
2016-06-03 17:52:38 +02:00
path="contract_settings"
component={ProxyHandler(AuthRedirect({ to: '/login', when: 'loggedOut' }))(ContractSettings)} />
2016-04-06 16:22:03 +02:00
<Route
2016-06-03 17:52:38 +02:00
path="register_piece"
component={ProxyHandler(AuthRedirect({ to: '/login', when: 'loggedOut' }))(MarketRegisterPiece)}
2016-04-06 16:22:03 +02:00
headerTitle={getLangText('+ NEW WORK')}
2016-06-03 17:52:38 +02:00
aclName="acl_wallet_submit" />
2016-04-06 16:22:03 +02:00
<Route
2016-06-03 17:52:38 +02:00
path="collection"
component={ProxyHandler(AuthRedirect({ to: '/login', when: 'loggedOut' }))(MarketPieceList)}
2016-04-06 16:22:03 +02:00
headerTitle={getLangText('COLLECTION')}
2016-06-03 17:52:38 +02:00
disableOn="noPieces" />
<Route path="pieces/:pieceId" component={MarketPieceContainer} />
<Route path="editions/:editionId" component={MarketEditionContainer} />
<Route path="verify" component={CoaVerifyContainer} />
<Route path="*" component={ErrorNotFoundPage} />
2016-04-06 16:22:03 +02:00
</Route>
),
'liquidgallery': (
2016-06-03 17:52:38 +02:00
<Route path="/" component={WalletApp}>
<IndexRoute component={ProxyHandler(AuthRedirect({ to: '/collection', when: 'loggedIn' }))(MarketLanding)} />
2016-02-24 11:16:56 +01:00
<Route
2016-06-03 17:52:38 +02:00
path="login"
component={ProxyHandler(AuthRedirect({ to: '/collection', when: 'loggedIn' }))(LoginContainer)} />
<Route
2016-06-03 17:52:38 +02:00
path="logout"
component={ProxyHandler(AuthRedirect({ to: '/', when: 'loggedOut' }))(LogoutContainer)} />
<Route
2016-06-03 17:52:38 +02:00
path="signup"
component={ProxyHandler(AuthRedirect({ to: '/collection', when: 'loggedIn' }))(SignupContainer)} />
<Route
2016-06-03 17:52:38 +02:00
path="password_reset"
component={ProxyHandler(AuthRedirect({ to: '/collection', when: 'loggedIn' }))(PasswordResetContainer)} />
<Route
2016-06-03 17:52:38 +02:00
path="settings"
component={ProxyHandler(AuthRedirect({ to: '/login', when: 'loggedOut' }))(SettingsContainer)} />
<Route
2016-06-03 17:52:38 +02:00
path="contract_settings"
component={ProxyHandler(AuthRedirect({ to: '/login', when: 'loggedOut' }))(ContractSettings)} />
<Route
2016-06-03 17:52:38 +02:00
path="register_piece"
component={ProxyHandler(AuthRedirect({ to: '/login', when: 'loggedOut' }))(MarketRegisterPiece)}
2016-02-08 14:50:24 +01:00
headerTitle={getLangText('+ NEW WORK')}
2016-06-03 17:52:38 +02:00
aclName="acl_wallet_submit" />
<Route
2016-06-03 17:52:38 +02:00
path="collection"
component={ProxyHandler(AuthRedirect({ to: '/login', when: 'loggedOut' }))(MarketPieceList)}
2016-02-08 14:50:24 +01:00
headerTitle={getLangText('COLLECTION')}
2016-06-03 17:52:38 +02:00
disableOn="noPieces" />
<Route path="pieces/:pieceId" component={MarketPieceContainer} />
<Route path="editions/:editionId" component={MarketEditionContainer} />
<Route path="verify" component={CoaVerifyContainer} />
<Route path="*" component={ErrorNotFoundPage} />
2015-11-24 12:08:37 +01:00
</Route>
)
};
2016-06-03 17:52:38 +02:00
export default function getWalletRoutes(subdomain) {
if (subdomain in ROUTES) {
return (ROUTES[subdomain]);
} else {
2016-06-03 17:52:38 +02:00
throw new Error("Subdomain wasn't specified in the wallet app.");
}
}