1
0
mirror of https://github.com/ascribe/onion.git synced 2024-12-22 17:33:14 +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 8f2ace77af
commit f1b677dbd1
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 { activeRoute, children, history, routes } = this.props;
const { currentUser } = this.state; const { currentUser } = this.state;
const subdomain = getSubdomain(); const subdomain = getSubdomain();
const path = activeRoute && activeRoute.path;
// 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;
let style = {}; let style = {};
let header; let header;

View File

@ -23,10 +23,7 @@ let PrizeApp = React.createClass({
render() { render() {
const { activeRoute, children, history, routes } = this.props; const { activeRoute, children, history, routes } = this.props;
const subdomain = getSubdomain(); const subdomain = getSubdomain();
const path = activeRoute && activeRoute.path;
// 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;
let header = null; let header = null;
// if the path of the current activeRoute is not defined, then this is the IndexRoute // 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() { render() {
const { activeRoute, children, history, routes } = this.props; const { activeRoute, children, history, routes } = this.props;
const subdomain = getSubdomain(); const subdomain = getSubdomain();
const path = activeRoute && activeRoute.path;
// 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;
let header = null; let header = null;
// if the path of the current activeRoute is not defined, then this is the IndexRoute // if the path of the current activeRoute is not defined, then this is the IndexRoute