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

redirect all whitelabel routes too

This commit is contained in:
Matthias Kretschmann 2018-05-31 11:57:00 +02:00
parent 2c7d86c5d5
commit ef8ecd3737
Signed by: m
GPG Key ID: 606EEEF3C479A91F
3 changed files with 35 additions and 47 deletions

View File

@ -130,7 +130,6 @@ let Header = React.createClass({
const { unfilteredPieceListCount } = this.state;
let account;
let signup;
let navRoutesLinks;
if (currentUser.username) {
@ -188,13 +187,6 @@ let Header = React.createClass({
</NavItem>
</LinkContainer>
);
signup = (
<LinkContainer to="/signup">
<NavItem>
{getLangText('SIGNUP')}
</NavItem>
</LinkContainer>
);
}
return (
@ -216,7 +208,6 @@ let Header = React.createClass({
<Nav navbar right>
<HeaderNotificationDebug show={false} />
{account}
{signup}
</Nav>
<HeaderNotifications currentUser={currentUser} />
{navRoutesLinks}

View File

@ -1,7 +1,7 @@
'use strict';
import React from 'react';
import { Route, IndexRoute } from 'react-router';
import { Route, IndexRoute, Redirect } from 'react-router';
import { ProxyHandler, AuthRedirect } from '../../../components/ascribe_routes/proxy_handler';
import { AuthPrizeRoleRedirect } from './portfolioreview/components/pr_routes/pr_proxy_handler';
@ -16,7 +16,6 @@ import ErrorNotFoundPage from '../../error_not_found_page';
import SPApp from './simple_prize/prize_app';
import SPLanding from './simple_prize/components/prize_landing';
import SPLoginContainer from './simple_prize/components/prize_login_container';
import SPSignupContainer from './simple_prize/components/prize_signup_container';
import SPRegisterPiece from './simple_prize/components/prize_register_piece';
import SPPieceList from './simple_prize/components/prize_piece_list';
import SPPieceContainer from './simple_prize/components/ascribe_detail/prize_piece_container';
@ -42,9 +41,9 @@ const ROUTES = {
<Route
path='logout'
component={ProxyHandler(AuthRedirect({to: '/', when: 'loggedOut'}))(LogoutContainer)} />
<Route
path='signup'
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(SPSignupContainer)} />
<Route path='signup'>
<Redirect to="/login" />
</Route>
<Route
path='password_reset'
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(PasswordResetContainer)} />

View File

@ -1,7 +1,7 @@
'use strict';
import React from 'react';
import { Route, IndexRoute } from 'react-router';
import { Route, IndexRoute, Redirect } from 'react-router';
import { ProxyHandler, AuthRedirect } from '../../../components/ascribe_routes/proxy_handler';
@ -9,7 +9,6 @@ import { ProxyHandler, AuthRedirect } from '../../../components/ascribe_routes/p
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';
@ -69,9 +68,9 @@ let ROUTES = {
<Route
path='logout'
component={ProxyHandler(AuthRedirect({to: '/', when: 'loggedOut'}))(LogoutContainer)} />
<Route
path='signup'
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(SignupContainer)} />
<Route path='signup'>
<Redirect to="/login" />
</Route>
<Route
path='password_reset'
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(PasswordResetContainer)} />
@ -113,9 +112,9 @@ let ROUTES = {
<Route
path='logout'
component={ProxyHandler(AuthRedirect({to: '/', when: 'loggedOut'}))(LogoutContainer)} />
<Route
path='signup'
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(SignupContainer)} />
<Route path='signup'>
<Redirect to="/login" />
</Route>
<Route
path='password_reset'
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(PasswordResetContainer)} />
@ -158,9 +157,9 @@ let ROUTES = {
<Route
path='logout'
component={ProxyHandler(AuthRedirect({to: '/', when: 'loggedOut'}))(LogoutContainer)} />
<Route
path='signup'
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(SignupContainer)} />
<Route path='signup'>
<Redirect to="/login" />
</Route>
<Route
path='password_reset'
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(PasswordResetContainer)} />
@ -212,9 +211,9 @@ let ROUTES = {
<Route
path='logout'
component={ProxyHandler(AuthRedirect({to: '/', when: 'loggedOut'}))(LogoutContainer)} />
<Route
path='signup'
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(SignupContainer)} />
<Route path='signup'>
<Redirect to="/login" />
</Route>
<Route
path='password_reset'
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(PasswordResetContainer)} />
@ -259,10 +258,9 @@ let ROUTES = {
path='logout'
component={ProxyHandler(AuthRedirect({to: '/', when: 'loggedOut'}))(LogoutContainer)}
footer={MarketFooter} />
<Route
path='signup'
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(SignupContainer)}
footer={MarketFooter} />
<Route path='signup'>
<Redirect to="/login" />
</Route>
<Route
path='password_reset'
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(PasswordResetContainer)}
@ -314,9 +312,9 @@ let ROUTES = {
<Route
path='logout'
component={ProxyHandler(AuthRedirect({to: '/', when: 'loggedOut'}))(LogoutContainer)} />
<Route
path='signup'
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(SignupContainer)} />
<Route path='signup'>
<Redirect to="/login" />
</Route>
<Route
path='password_reset'
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(PasswordResetContainer)} />
@ -351,9 +349,9 @@ let ROUTES = {
<Route
path='logout'
component={ProxyHandler(AuthRedirect({to: '/', when: 'loggedOut'}))(LogoutContainer)} />
<Route
path='signup'
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(SignupContainer)} />
<Route path='signup'>
<Redirect to="/login" />
</Route>
<Route
path='password_reset'
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(PasswordResetContainer)} />
@ -388,9 +386,9 @@ let ROUTES = {
<Route
path='logout'
component={ProxyHandler(AuthRedirect({to: '/', when: 'loggedOut'}))(LogoutContainer)} />
<Route
path='signup'
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(SignupContainer)} />
<Route path='signup'>
<Redirect to="/login" />
</Route>
<Route
path='password_reset'
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(PasswordResetContainer)} />
@ -425,9 +423,9 @@ let ROUTES = {
<Route
path='logout'
component={ProxyHandler(AuthRedirect({to: '/', when: 'loggedOut'}))(LogoutContainer)} />
<Route
path='signup'
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(SignupContainer)} />
<Route path='signup'>
<Redirect to="/login" />
</Route>
<Route
path='password_reset'
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(PasswordResetContainer)} />
@ -461,9 +459,9 @@ let ROUTES = {
<Route
path='logout'
component={ProxyHandler(AuthRedirect({to: '/', when: 'loggedOut'}))(LogoutContainer)} />
<Route
path='signup'
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(SignupContainer)} />
<Route path='signup'>
<Redirect to="/login" />
</Route>
<Route
path='password_reset'
component={ProxyHandler(AuthRedirect({to: '/collection', when: 'loggedIn'}))(PasswordResetContainer)} />