mirror of
https://github.com/ascribe/onion.git
synced 2024-12-22 17:33:14 +01:00
Use previous method from white labels to get the current active route
This commit is contained in:
parent
15c7baf5d4
commit
1c1719807e
@ -37,13 +37,11 @@ export default function AppBase(App) {
|
|||||||
},
|
},
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { children } = this.props;
|
const { routes } = this.props;
|
||||||
|
|
||||||
// Get the currently active route of the app by using the injected route parameter
|
// The second element of the routes prop given to us by react-router is always the
|
||||||
// on the currently active child route.
|
// active second-level component object (ie. after App).
|
||||||
// Note that despite its name, this.props.children can only ever be a single
|
const activeRoute = routes[1];
|
||||||
// React.PropTypes.element.
|
|
||||||
const activeRoute = children.props.route;
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
|
Loading…
Reference in New Issue
Block a user