From 4a880a97157d76d2428f9caf2649b7268577ac4d Mon Sep 17 00:00:00 2001 From: sinthuja Date: Thu, 14 Sep 2017 16:13:23 +0530 Subject: [PATCH] Adding login page redirection. --- .../src/main/resources/store/src/App.jsx | 21 ++++++++----------- .../store/src/components/BaseLayout.jsx | 10 +++------ 2 files changed, 12 insertions(+), 19 deletions(-) diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.store.ui/src/main/resources/store/src/App.jsx b/components/application-mgt/org.wso2.carbon.device.application.mgt.store.ui/src/main/resources/store/src/App.jsx index 336b85a7bdc..8325bbc9572 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.store.ui/src/main/resources/store/src/App.jsx +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.store.ui/src/main/resources/store/src/App.jsx @@ -63,18 +63,15 @@ class Base extends Component { render() { this.setState(); - if (this.state.user) { - return ( -
- - - - - -
- ) - } - return () + return ( +
+ + + + + +
+ ) } setState() { diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.store.ui/src/main/resources/store/src/components/BaseLayout.jsx b/components/application-mgt/org.wso2.carbon.device.application.mgt.store.ui/src/main/resources/store/src/components/BaseLayout.jsx index fea7f5e03b4..d446c7556d8 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.store.ui/src/main/resources/store/src/components/BaseLayout.jsx +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.store.ui/src/main/resources/store/src/components/BaseLayout.jsx @@ -21,16 +21,12 @@ import Badge from 'material-ui/Badge'; import React, {Component} from 'react'; import AppBar from 'material-ui/AppBar'; import Drawer from 'material-ui/Drawer'; -import {withRouter} from 'react-router-dom'; import IconButton from 'material-ui/IconButton'; import {List, ListItem} from 'material-ui/List'; import Apps from 'material-ui/svg-icons/navigation/apps'; -import Add from 'material-ui/svg-icons/content/add-circle'; -import Feedback from 'material-ui/svg-icons/action/feedback'; -import DevicesOther from 'material-ui/svg-icons/hardware/devices-other'; import NotificationsIcon from 'material-ui/svg-icons/social/notifications'; import ActionAccountCircle from 'material-ui/svg-icons/action/account-circle'; -import FlatButton from 'material-ui/FlatButton'; +import { Link } from 'react-router-dom'; /** * Base Layout: @@ -71,7 +67,7 @@ class BaseLayout extends Component { ); } else { return ( - + Login ); } } @@ -82,7 +78,7 @@ class BaseLayout extends Component { + badgeStyle={{top: 12, right: 12}}>