From ab4b5d17649930c0dddd6f0b4b237d722c105b4e Mon Sep 17 00:00:00 2001 From: Jayasanka Date: Tue, 26 Mar 2019 22:40:28 +0530 Subject: [PATCH] Created Layout for dashboard --- .../src/pages/dashboard/Dashboard.js | 25 ++++++++++--------- 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/src/pages/dashboard/Dashboard.js b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/src/pages/dashboard/Dashboard.js index 6088af4b6f..cca9ef97b5 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/src/pages/dashboard/Dashboard.js +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/src/pages/dashboard/Dashboard.js @@ -1,5 +1,5 @@ import React from "react"; -import { Layout, Menu, Breadcrumb } from 'antd'; +import { Layout, Menu, Breadcrumb, PageHeader } from 'antd'; const { Header, Content, Footer } = Layout; @@ -8,15 +8,15 @@ import Logo from "../../../public/images/logo.svg"; import Login from "../Login"; import {renderRoutes} from "react-router-config"; import {NavLink} from "react-router-dom"; +import RouteWithSubRoutes from "../../components/RouteWithSubRoutes" class Dashboard extends React.Component { constructor(props) { super(props); this.state = { - route : props.route + routes : props.routes } - console.log(props); } render() { @@ -35,19 +35,20 @@ class Dashboard extends React.Component { nav 3 - - + + Home List App - - Items - - - {/* child routes won't render without this */} - {renderRoutes(this.state.route.routes, { someProp: "these extra props are optional" })} -
Content
+ +
+ {this.state.routes.map((route) => ( + + ))} +