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

Use the activeRoute prop to generate route classnames on whitelabels

This commit is contained in:
Brett Sun 2016-02-03 12:38:34 +01:00
parent 946d80e94f
commit 1b08f915c2
3 changed files with 3 additions and 12 deletions

View File

@ -61,10 +61,7 @@ let PRApp = React.createClass({
const { activeRoute, children, history, routes } = this.props;
const { currentUser } = this.state;
const subdomain = getSubdomain();
// The second element of routes is always the active component object, where we can
// extract the path.
const path = routes[1] ? routes[1].path : null;
const path = activeRoute && activeRoute.path;
let style = {};
let header;

View File

@ -23,10 +23,7 @@ let PrizeApp = React.createClass({
render() {
const { activeRoute, children, history, routes } = this.props;
const subdomain = getSubdomain();
// The second element of routes is always the active component object, where we can
// extract the path.
const path = routes[1] ? routes[1].path : null;
const path = activeRoute && activeRoute.path;
let header = null;
// if the path of the current activeRoute is not defined, then this is the IndexRoute

View File

@ -21,10 +21,7 @@ let WalletApp = React.createClass({
render() {
const { activeRoute, children, history, routes } = this.props;
const subdomain = getSubdomain();
// The second element of routes is always the active component object, where we can
// extract the path.
const path = routes[1] ? routes[1].path : null;
const path = activeRoute && activeRoute.path;
let header = null;
// if the path of the current activeRoute is not defined, then this is the IndexRoute