diff --git a/frontend/src/component/app.jsx b/frontend/src/component/app.jsx index 5b8fecbda9..3269b7b12a 100644 --- a/frontend/src/component/app.jsx +++ b/frontend/src/component/app.jsx @@ -25,6 +25,16 @@ export default class App extends Component { router: React.PropTypes.object, } + componentDidMount () { + document.title = `${this.getCurrentSection()} - Unleash Admin`; + } + + getCurrentSection () { + const { routes } = this.props; + const lastRoute = routes[routes.length - 1]; + return lastRoute ? lastRoute.pageTitle : ''; + } + onOverlayClick = () => this.setState({ drawerActive: false }); render () { @@ -39,7 +49,7 @@ export default class App extends Component {
-
Unleash Admin / The Title}> +
Unleash Admin / {this.getCurrentSection()}}> Github diff --git a/frontend/src/index.jsx b/frontend/src/index.jsx index 37383807d1..94ff41fff6 100644 --- a/frontend/src/index.jsx +++ b/frontend/src/index.jsx @@ -32,16 +32,16 @@ ReactDOM.render( - - - - - - - - - - + + + + + + + + + + , document.getElementById('app'));