diff --git a/js/app.js b/js/app.js index 5f76f259..4b878435 100644 --- a/js/app.js +++ b/js/app.js @@ -75,7 +75,8 @@ class AppGateway { subdomain = settings.subdomain; } - if(subdomain) { + // www and cc do not have a landing page + if(subdomain && subdomain !== 'cc') { redirectRoute = null; } diff --git a/js/components/whitelabel/prize/prize_app.js b/js/components/whitelabel/prize/prize_app.js index e3ae736b..aadb0b05 100644 --- a/js/components/whitelabel/prize/prize_app.js +++ b/js/components/whitelabel/prize/prize_app.js @@ -20,13 +20,19 @@ let PrizeApp = React.createClass({ }, render() { + const { history, routes } = this.props; let header = null; let subdomain = getSubdomain(); - if (this.props.history.isActive('/') || this.props.history.isActive('/login') || this.props.history.isActive('/signup')) { + // The second element of routes is always the active component object, where we can + // extract the path. + let path = routes[1] ? routes[1].path : null; + + // if the path of the current activeRoute is not defined, then this is the IndexRoute + if (!path || history.isActive('/login') || history.isActive('/signup')) { header = ; } else { - header =
; + header =
; } return ( diff --git a/js/components/whitelabel/prize/prize_routes.js b/js/components/whitelabel/prize/prize_routes.js index 891bc391..f00e1abb 100644 --- a/js/components/whitelabel/prize/prize_routes.js +++ b/js/components/whitelabel/prize/prize_routes.js @@ -1,7 +1,7 @@ 'use strict'; import React from 'react'; -import { Route } from 'react-router'; +import { Route, IndexRoute } from 'react-router'; import Landing from './components/prize_landing'; import LoginContainer from './components/prize_login_container'; @@ -19,22 +19,49 @@ import ErrorNotFoundPage from '../../../components/error_not_found_page'; import App from './prize_app'; import AppConstants from '../../../constants/application_constants'; +import ProxyRoute from '../../../components/ascribe_routes/proxy_route'; +import RedirectProxyHandler from '../../../components/ascribe_routes/proxy_routes/redirect_proxy_handler'; + let baseUrl = AppConstants.baseUrl; function getRoutes() { return ( - - - - - - - + + + + + + + + + - diff --git a/js/components/whitelabel/wallet/wallet_app.js b/js/components/whitelabel/wallet/wallet_app.js index 8a9327d0..2ae0a7fc 100644 --- a/js/components/whitelabel/wallet/wallet_app.js +++ b/js/components/whitelabel/wallet/wallet_app.js @@ -22,20 +22,20 @@ let WalletApp = React.createClass({ }, render() { + let header = null; let subdomain = getSubdomain(); + const { history, routes, children } = this.props; // The second element of routes is always the active component object, where we can // extract the path. - let [, { path } ] = this.props.routes; - - let header = null; + let path = routes[1] ? routes[1].path : null; // if the path of the current activeRoute is not defined, then this is the IndexRoute - if ((!path || this.props.history.isActive('/login') || this.props.history.isActive('/signup') || this.props.history.isActive('/contract_notifications')) + if ((!path || history.isActive('/login') || history.isActive('/signup') || history.isActive('/contract_notifications')) && (['ikonotv', 'cyland']).indexOf(subdomain) > -1) { header = (
); } else { - header =
; + header =
; } // In react-router 1.0, Routes have no 'name' property anymore. To keep functionality however, @@ -44,7 +44,7 @@ let WalletApp = React.createClass({
{header} - {this.props.children} + {children}