1
0
mirror of https://github.com/ascribe/onion.git synced 2024-12-22 09:23:13 +01:00

Add footer property to Route

This commit is contained in:
Tim Daubenschütz 2016-03-04 15:53:55 +01:00
parent 66e4591a56
commit 1c94ecc177
8 changed files with 128 additions and 202 deletions

View File

@ -21,6 +21,7 @@ let AscribeApp = React.createClass({
render() {
const { activeRoute, children, currentUser, routes, whitelabel } = this.props;
const Footer = activeRoute && activeRoute.footer;
return (
<div className="ascribe-app ascribe-default-app">
@ -34,7 +35,7 @@ let AscribeApp = React.createClass({
{/* Routes are injected here */}
{children}
</AppRouteWrapper>
<Footer activeRoute={activeRoute} />
{Footer ? <Footer /> : null}
</div>
);
}

View File

@ -4,13 +4,10 @@ import React from 'react';
import { getLangText } from '../utils/lang_utils';
let Footer = React.createClass({
propTypes: {
activeRoute: React.PropTypes.object.isRequired
},
const Footer = React.createClass({
render() {
return !this.props.activeRoute.hideFooter ? (
return (
<div className="ascribe-footer hidden-print">
<p className="ascribe-sub-sub-statement">
<br />
@ -28,7 +25,7 @@ let Footer = React.createClass({
<a href="https://www.linkedin.com/company/4816284?trk=vsrp_companies_res_name&trkInfo=VSRPsearchId%3A122827941425632318075%2CVSRPtargetId%3A4816284%2CVSRPcmpt%3Aprimary" className="social social-linked-in" target="_blank"></a>
</p>
</div>
) : null;
);
}
});

View File

@ -35,6 +35,7 @@ let PRApp = React.createClass({
const { activeRoute, children, currentUser, history, routes, whitelabel } = this.props;
const subdomain = getSubdomain();
const path = activeRoute && activeRoute.path;
const Footer = activeRoute && activeRoute.footer;
let style = {};
let header;
@ -64,7 +65,7 @@ let PRApp = React.createClass({
{/* Routes are injected here */}
{children}
</AppRouteWrapper>
<Footer activeRoute={activeRoute} />
{Footer ? <Footer /> : null}
</div>
);
}

View File

@ -35,115 +35,91 @@ const ROUTES = {
sluice: (
<Route path='/' component={SPApp}>
<IndexRoute
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(SPLanding)}
hideFooter />
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(SPLanding)} />
<Route
path='login'
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(SPLoginContainer)}
hideFooter />
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(SPLoginContainer)} />
<Route
path='logout'
component={ProxyHandler(AuthRedirect({to: '/', when: 'loggedOut'}))(LogoutContainer)}
hideFooter />
component={ProxyHandler(AuthRedirect({to: '/', when: 'loggedOut'}))(LogoutContainer)} />
<Route
path='signup'
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(SPSignupContainer)}
hideFooter />
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(SPSignupContainer)} />
<Route
path='password_reset'
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(PasswordResetContainer)}
hideFooter />
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(PasswordResetContainer)} />
<Route
path='settings'
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(SPSettingsContainer)}
hideFooter />
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(SPSettingsContainer)} />
<Route
path='register_piece'
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(SPRegisterPiece)}
headerTitle={getLangText('+ NEW WORK')}
hideFooter />
headerTitle={getLangText('+ NEW WORK')} />
<Route
path='collection'
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(SPPieceList)}
headerTitle={getLangText('COLLECTION')}
hideFooter />
headerTitle={getLangText('COLLECTION')} />
<Route
path='pieces/:pieceId'
component={SluicePieceContainer}
hideFooter />
component={SluicePieceContainer} />
<Route
path='editions/:editionId'
component={EditionContainer}
hideFooter />
component={EditionContainer} />
<Route
path='coa_verify'
component={CoaVerifyContainer}
hideFooter />
component={CoaVerifyContainer} />
<Route
path='*'
component={ErrorNotFoundPage}
hideFooter />
component={ErrorNotFoundPage} />
</Route>
),
portfolioreview: (
<Route path='/' component={PRApp}>
<IndexRoute
component={ProxyHandler(AuthPrizeRoleRedirect({ to: '/collection', when: ['is_admin', 'is_judge', 'is_jury'] }))(PRLanding)}
hideFooter />
component={ProxyHandler(AuthPrizeRoleRedirect({ to: '/collection', when: ['is_admin', 'is_judge', 'is_jury'] }))(PRLanding)} />
<Route
path='register_piece'
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(PRRegisterPiece)}
hideFooter />
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(PRRegisterPiece)} />
<Route
path='collection'
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(SPPieceList)}
headerTitle={getLangText('SUBMISSIONS')}
hideFooter />
headerTitle={getLangText('SUBMISSIONS')} />
<Route
path='login'
component={ProxyHandler(
AuthPrizeRoleRedirect({ to: '/collection', when: ['is_admin', 'is_judge', 'is_jury'] }),
AuthRedirect({to: '/register_piece', when: 'loggedIn'})
)(SPLoginContainer)}
hideFooter />
)(SPLoginContainer)} />
<Route
path='logout'
component={ProxyHandler(AuthRedirect({to: '/', when: 'loggedOut'}))(LogoutContainer)}
hideFooter />
component={ProxyHandler(AuthRedirect({to: '/', when: 'loggedOut'}))(LogoutContainer)} />
<Route
path='signup'
component={ProxyHandler(
AuthPrizeRoleRedirect({ to: '/collection', when: ['is_admin', 'is_judge', 'is_jury'] }),
AuthRedirect({to: '/register_piece', when: 'loggedIn'})
)(SPSignupContainer)}
hideFooter />
)(SPSignupContainer)} />
<Route
path='password_reset'
component={ProxyHandler(
AuthPrizeRoleRedirect({ to: '/collection', when: ['is_admin', 'is_judge', 'is_jury'] }),
AuthRedirect({to: '/register_piece', when: 'loggedIn'})
)(PasswordResetContainer)}
hideFooter />
)(PasswordResetContainer)} />
<Route
path='settings'
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(SPSettingsContainer)}
hideFooter />
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(SPSettingsContainer)} />
<Route
path='pieces/:pieceId'
component={SPPieceContainer}
hideFooter />
component={SPPieceContainer} />
<Route
path='editions/:editionId'
component={EditionContainer}
hideFooter />
component={EditionContainer} />
<Route
path='coa_verify'
component={CoaVerifyContainer}
hideFooter />
component={CoaVerifyContainer} />
<Route
path='*'
component={ErrorNotFoundPage}
hideFooter />
component={ErrorNotFoundPage} />
</Route>
)
};

View File

@ -29,6 +29,7 @@ let PrizeApp = React.createClass({
const { activeRoute, children, currentUser, history, routes, whitelabel } = this.props;
const subdomain = getSubdomain();
const path = activeRoute && activeRoute.path;
const Footer = activeRoute && activeRoute.footer;
let header = null;
// if the path of the current activeRoute is not defined, then this is the IndexRoute
@ -52,7 +53,7 @@ let PrizeApp = React.createClass({
{/* Routes are injected here */}
{children}
</AppRouteWrapper>
<Footer activeRoute={activeRoute} />
{Footer ? <Footer /> : null}
</div>
);
}

View File

@ -27,6 +27,7 @@ let WalletApp = React.createClass({
const { activeRoute, children, currentUser, history, routes, whitelabel } = this.props;
const subdomain = getSubdomain();
const path = activeRoute && activeRoute.path;
const Footer = activeRoute && activeRoute.footer;
let header = null;
// if the path of the current activeRoute is not defined, then this is the IndexRoute
@ -53,7 +54,7 @@ let WalletApp = React.createClass({
{/* Routes are injected here */}
{children}
</AppRouteWrapper>
<Footer activeRoute={activeRoute} />
{Footer ? <Footer /> : null}
</div>
);
}

View File

@ -17,6 +17,7 @@ import EditionContainer from '../../../components/ascribe_detail/edition_contain
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 Footer from '../../../components/footer.js';
import CCRegisterPiece from './components/cc/cc_register_piece';
@ -57,301 +58,235 @@ let ROUTES = {
'cyland': (
<Route path='/' component={WalletApp}>
<IndexRoute
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(CylandLanding)}
hideFooter />
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(CylandLanding)} />
<Route
path='login'
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(LoginContainer)}
hideFooter />
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(LoginContainer)} />
<Route
path='logout'
component={ProxyHandler(AuthRedirect({to: '/', when: 'loggedOut'}))(LogoutContainer)}
hideFooter />
component={ProxyHandler(AuthRedirect({to: '/', when: 'loggedOut'}))(LogoutContainer)} />
<Route
path='signup'
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(SignupContainer)}
hideFooter />
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(SignupContainer)} />
<Route
path='password_reset'
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(PasswordResetContainer)}
hideFooter />
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(PasswordResetContainer)} />
<Route
path='settings'
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(SettingsContainer)}
hideFooter />
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(SettingsContainer)} />
<Route
path='contract_settings'
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(ContractSettings)}
hideFooter />
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(ContractSettings)} />
<Route
path='register_piece'
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(CylandRegisterPiece)}
headerTitle={getLangText('+ NEW WORK')}
aclName='acl_wallet_submit'
hideFooter />
aclName='acl_wallet_submit' />
<Route
path='collection'
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(CylandPieceList)}
headerTitle={getLangText('COLLECTION')}
disableOn='noPieces'
hideFooter />
disableOn='noPieces' />
<Route
path='editions/:editionId'
component={EditionContainer}
hideFooter />
component={EditionContainer} />
<Route
path='coa_verify'
component={CoaVerifyContainer}
hideFooter />
component={CoaVerifyContainer} />
<Route
path='pieces/:pieceId'
component={CylandPieceContainer}
hideFooter />
component={CylandPieceContainer} />
<Route
path='*'
component={ErrorNotFoundPage}
hideFooter />
component={ErrorNotFoundPage} />
</Route>
),
'cc': (
<Route path='/' component={WalletApp}>
<Route
path='login'
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(LoginContainer)}
hideFooter />
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(LoginContainer)} />
<Route
path='logout'
component={ProxyHandler(AuthRedirect({to: '/', when: 'loggedOut'}))(LogoutContainer)}
hideFooter />
component={ProxyHandler(AuthRedirect({to: '/', when: 'loggedOut'}))(LogoutContainer)} />
<Route
path='signup'
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(SignupContainer)}
hideFooter />
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(SignupContainer)} />
<Route
path='password_reset'
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(PasswordResetContainer)}
hideFooter />
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(PasswordResetContainer)} />
<Route
path='settings'
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(SettingsContainer)}
hideFooter />
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(SettingsContainer)} />
<Route
path='contract_settings'
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(ContractSettings)}
hideFooter />
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(ContractSettings)} />
<Route
path='register_piece'
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(CCRegisterPiece)}
headerTitle={getLangText('+ NEW WORK')}
hideFooter />
headerTitle={getLangText('+ NEW WORK')} />
<Route
path='collection'
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(PieceList)}
headerTitle={getLangText('COLLECTION')}
disableOn='noPieces'
hideFooter />
disableOn='noPieces' />
<Route
path='pieces/:pieceId'
component={PieceContainer}
hideFooter />
component={PieceContainer} />
<Route
path='editions/:editionId'
component={EditionContainer}
hideFooter />
component={EditionContainer} />
<Route
path='coa_verify'
component={CoaVerifyContainer}
hideFooter />
component={CoaVerifyContainer} />
<Route
path='*'
component={ErrorNotFoundPage}
hideFooter />
component={ErrorNotFoundPage} />
</Route>
),
'ikonotv': (
<Route path='/' component={WalletApp}>
<IndexRoute
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(IkonotvLanding)}
hideFooter />
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(IkonotvLanding)} />
<Route
path='login'
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(LoginContainer)}
hideFooter />
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(LoginContainer)} />
<Route
path='logout'
component={ProxyHandler(AuthRedirect({to: '/', when: 'loggedOut'}))(LogoutContainer)}
hideFooter />
component={ProxyHandler(AuthRedirect({to: '/', when: 'loggedOut'}))(LogoutContainer)} />
<Route
path='signup'
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(SignupContainer)}
hideFooter />
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(SignupContainer)} />
<Route
path='password_reset'
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(PasswordResetContainer)}
hideFooter />
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(PasswordResetContainer)} />
<Route
path='settings'
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(SettingsContainer)}
hideFooter />
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(SettingsContainer)} />
<Route
path='contract_settings'
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(ContractSettings)}
hideFooter />
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(ContractSettings)} />
<Route
path='request_loan'
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(SendContractAgreementForm)}
headerTitle={getLangText('SEND NEW CONTRACT')}
aclName='acl_create_contractagreement'
hideFooter />
aclName='acl_create_contractagreement' />
<Route
path='register_piece'
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(IkonotvRegisterPiece)}
headerTitle={getLangText('+ NEW WORK')}
aclName='acl_wallet_submit'
hideFooter />
aclName='acl_wallet_submit' />
<Route
path='collection'
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(IkonotvPieceList)}
headerTitle={getLangText('COLLECTION')}
disableOn='noPieces'
hideFooter />
disableOn='noPieces' />
<Route
path='contract_notifications'
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(IkonotvContractNotifications)}
hideFooter />
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(IkonotvContractNotifications)} />
<Route
path='pieces/:pieceId'
component={IkonotvPieceContainer}
hideFooter />
component={IkonotvPieceContainer} />
<Route
path='editions/:editionId'
component={EditionContainer}
hideFooter />
component={EditionContainer} />
<Route
path='coa_verify'
component={CoaVerifyContainer}
hideFooter />
component={CoaVerifyContainer} />
<Route
path='*'
component={ErrorNotFoundPage}
hideFooter />
component={ErrorNotFoundPage} />
</Route>
),
'lumenus': (
<Route path='/' component={WalletApp}>
<IndexRoute
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(LumenusLanding)}
hideFooter />
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(LumenusLanding)} />
<Route
path='login'
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(LoginContainer)}
hideFooter />
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(LoginContainer)} />
<Route
path='logout'
component={ProxyHandler(AuthRedirect({to: '/', when: 'loggedOut'}))(LogoutContainer)}
hideFooter />
component={ProxyHandler(AuthRedirect({to: '/', when: 'loggedOut'}))(LogoutContainer)} />
<Route
path='signup'
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(SignupContainer)}
hideFooter />
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(SignupContainer)} />
<Route
path='password_reset'
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(PasswordResetContainer)}
hideFooter />
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(PasswordResetContainer)} />
<Route
path='settings'
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(SettingsContainer)}
hideFooter />
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(SettingsContainer)} />
<Route
path='contract_settings'
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(ContractSettings)}
hideFooter />
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(ContractSettings)} />
<Route
path='register_piece'
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(MarketRegisterPiece)}
headerTitle={getLangText('+ NEW WORK')}
aclName='acl_wallet_submit'
hideFooter />
aclName='acl_wallet_submit' />
<Route
path='collection'
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(MarketPieceList)}
headerTitle={getLangText('COLLECTION')}
disableOn='noPieces'
hideFooter />
disableOn='noPieces' />
<Route
path='pieces/:pieceId'
component={MarketPieceContainer}
hideFooter />
component={MarketPieceContainer} />
<Route
path='editions/:editionId'
component={MarketEditionContainer}
hideFooter />
component={MarketEditionContainer} />
<Route
path='coa_verify'
component={CoaVerifyContainer}
hideFooter />
component={CoaVerifyContainer} />
<Route
path='*'
component={ErrorNotFoundPage}
hideFooter />
component={ErrorNotFoundPage} />
</Route>
),
'23vivi': (
<Route path='/' component={WalletApp}>
<IndexRoute component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(Vivi23Landing)}
hideFooter />
<IndexRoute component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(Vivi23Landing)} />
<Route
path='login'
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(LoginContainer)}
hideFooter />
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(LoginContainer)} />
<Route
path='logout'
component={ProxyHandler(AuthRedirect({to: '/', when: 'loggedOut'}))(LogoutContainer)}
hideFooter />
component={ProxyHandler(AuthRedirect({to: '/', when: 'loggedOut'}))(LogoutContainer)} />
<Route
path='signup'
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(SignupContainer)}
hideFooter />
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(SignupContainer)} />
<Route
path='password_reset'
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(PasswordResetContainer)}
hideFooter />
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(PasswordResetContainer)} />
<Route
path='settings'
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(SettingsContainer)}
hideFooter />
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(SettingsContainer)} />
<Route
path='contract_settings'
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(ContractSettings)}
hideFooter />
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(ContractSettings)} />
<Route
path='register_piece'
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(MarketRegisterPiece)}
headerTitle={getLangText('+ NEW WORK')}
aclName='acl_wallet_submit'
hideFooter />
aclName='acl_wallet_submit' />
<Route
path='collection'
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(Vivi23PieceList)}
headerTitle={getLangText('COLLECTION')}
disableOn='noPieces'
hideFooter />
disableOn='noPieces' />
<Route
path='pieces/:pieceId'
component={MarketPieceContainer}
hideFooter />
component={MarketPieceContainer} />
<Route
path='editions/:editionId'
component={MarketEditionContainer}
hideFooter />
component={MarketEditionContainer} />
<Route
path='coa_verify'
component={CoaVerifyContainer}
hideFooter />
component={CoaVerifyContainer} />
<Route
path='*'
component={ErrorNotFoundPage}
hideFooter />
component={ErrorNotFoundPage} />
</Route>
),
'polline': (

View File

@ -25,6 +25,8 @@ import ErrorNotFoundPage from './components/error_not_found_page';
import RegisterPiece from './components/register_piece';
import Footer from './components/footer';
import { ProxyHandler, AuthRedirect } from './components/ascribe_routes/proxy_handler';
import { getLangText } from './utils/lang_utils';
@ -34,35 +36,47 @@ const COMMON_ROUTES = (
<Route path='/' component={AscribeApp}>
<Route
path='login'
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(LoginContainer)} />
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(LoginContainer)}
footer={Footer} />
<Route
path='register_piece'
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(RegisterPiece)}
headerTitle={getLangText('+ NEW WORK')} />
headerTitle={getLangText('+ NEW WORK')}
footer={Footer} />
<Route
path='collection'
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(PieceList)}
headerTitle={getLangText('COLLECTION')}
disableOn='noPieces' />
disableOn='noPieces'
footer={Footer} />
<Route
path='signup'
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(SignupContainer)} />
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(SignupContainer)}
footer={Footer} />
<Route
path='logout'
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(LogoutContainer)}/>
<Route path='pieces/:pieceId' component={PieceContainer} />
<Route path='editions/:editionId' component={EditionContainer} />
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(LogoutContainer)}
footer={Footer} />
<Route path='pieces/:pieceId' component={PieceContainer}
footer={Footer} />
<Route path='editions/:editionId' component={EditionContainer}
footer={Footer} />
<Route
path='password_reset'
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(PasswordResetContainer)} />
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(PasswordResetContainer)}
footer={Footer} />
<Route
path='settings'
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(SettingsContainer)} />
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(SettingsContainer)}
footer={Footer} />
<Route
path='contract_settings'
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(ContractSettings)} />
<Route path='coa_verify' component={CoaVerifyContainer} />
<Route path='*' component={ErrorNotFoundPage} />
component={ProxyHandler(AuthRedirect({to: '/login', when: 'loggedOut'}))(ContractSettings)}
footer={Footer} />
<Route path='coa_verify' component={CoaVerifyContainer}
footer={Footer} />
<Route path='*' component={ErrorNotFoundPage}
footer={Footer} />
</Route>
);