diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/AppPublisherBase/BaseLayout.jsx b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/AppPublisherBase/BaseLayout.jsx index eb64ab434a..cdf1b82a93 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/AppPublisherBase/BaseLayout.jsx +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/src/main/resources/publisher/src/components/AppPublisherBase/BaseLayout.jsx @@ -39,11 +39,12 @@ class BaseLayout extends Component { this.logout = this.logout.bind(this); this.closeModal = this.closeModal.bind(this); this.onClickPlatforms = this.onClickPlatforms.bind(this); + this.onClickApplications = this.onClickApplications.bind(this); this.state = { notifications: 0, user: 'Admin', openModal: false, - currentPage: "Applications", + currentPage: "", logo: {} }; } @@ -80,10 +81,25 @@ class BaseLayout extends Component { onClickPlatforms() { window.location.href = "/publisher/assets/platforms"; - this.setState({currentPage: "Platforms"}); + this.setState({currentPage: "Platforms"}) + } + + onClickApplications() { + window.location.href = "/publisher/assets/apps"; + } + + getCurrentPageTitle() { + let href = window.location.href; + + if (href.indexOf("apps") !== -1) { + return "Applications"; + } else if (href.indexOf("platforms") !== -1) { + return "Platforms" + } } + render() { const userName = this.state.user._userName[0]; return ( @@ -138,13 +154,21 @@ class BaseLayout extends Component {