diff --git a/embark-ui/src/components/ExplorerDashboardLayout.js b/embark-ui/src/components/ExplorerDashboardLayout.js new file mode 100644 index 000000000..9473dc04f --- /dev/null +++ b/embark-ui/src/components/ExplorerDashboardLayout.js @@ -0,0 +1,34 @@ +import React from 'react'; +import { + Page, + Grid +} from "tabler-react"; + +import AccountsContainer from '../containers/AccountsContainer'; +import BlocksContainer from '../containers/BlocksContainer'; +import TransactionsContainer from '../containers/TransactionsContainer'; + +const ExplorerDashboardLayout = () => ( + + + + Explorer + + + + + + + + + + + + + + + + +); + +export default ExplorerDashboardLayout; diff --git a/embark-ui/src/components/ExplorerLayout.js b/embark-ui/src/components/ExplorerLayout.js index ec7835335..9854d80af 100644 --- a/embark-ui/src/components/ExplorerLayout.js +++ b/embark-ui/src/components/ExplorerLayout.js @@ -1,5 +1,10 @@ import React from 'react'; -import {Route, Switch} from 'react-router-dom'; +import {NavLink, Route, Switch} from 'react-router-dom'; +import { + Page, + Grid, + List +} from "tabler-react"; import AccountsContainer from '../containers/AccountsContainer'; import AccountContainer from '../containers/AccountContainer'; @@ -8,15 +13,47 @@ import BlockContainer from '../containers/BlockContainer'; import TransactionsContainer from '../containers/TransactionsContainer'; import TransactionContainer from '../containers/TransactionContainer'; +const groupItems = [ + {to: "/embark/explorer", icon: "compass", value: "Overview", exact: true}, + {to: "/embark/explorer/accounts", icon: "users", value: "Accounts"}, + {to: "/embark/explorer/blocks", icon: "book-open", value: "Blocks"}, + {to: "/embark/explorer/transactions", icon: "activity", value: "Transactions"} +]; + +const className = "d-flex align-items-center"; + const ExplorerLayout = () => ( - - - - - - - - + + + Explorer + + + {groupItems.map((groupItem) => ( + + {groupItem.value} + + ))} + + + + + + + + + + + + + + ); export default ExplorerLayout; diff --git a/embark-ui/src/components/Layout.js b/embark-ui/src/components/Layout.js index a6eaaccbf..2bc46359c 100644 --- a/embark-ui/src/components/Layout.js +++ b/embark-ui/src/components/Layout.js @@ -23,7 +23,8 @@ const sidebarNavItems = {items: [ {name: "Dashboard", url: "/embark", icon: 'fa fa-tachometer'}, {name: "Deployment", url: "/embark/deployment", icon: "fa fa-arrow-up"}, {name: "Contracts", url: "/embark/contracts", icon: "fa fa-file-text"}, - {name: "Explorer", url: "/embark/explorer/accounts", icon: "fa fa-signal", children: [ + {name: "Explorer", url: "/embark/explorer", icon: "fa fa-signal", children: [ + {url: "/embark/explorer", icon: "fa fa-compass", name: "Overview", exact: true}, {url: "/embark/explorer/accounts", icon: "fa fa-users", name: "Accounts"}, {url: "/embark/explorer/blocks", icon: "fa fa-stop", name: "Blocks"}, {url: "/embark/explorer/transactions", icon: "fa fa-tree", name: "Transactions"}, diff --git a/embark-ui/src/routes.js b/embark-ui/src/routes.js index 1b5cd3bd1..d458cd9b1 100644 --- a/embark-ui/src/routes.js +++ b/embark-ui/src/routes.js @@ -6,6 +6,7 @@ import ContractsContainer from './containers/ContractsContainer'; import ContractLayoutContainer from './containers/ContractLayoutContainer'; import DeploymentContainer from './containers/DeploymentContainer'; import NoMatch from './components/NoMatch'; +import ExplorerDashboardLayout from './components/ExplorerDashboardLayout'; import ExplorerLayout from './components/ExplorerLayout'; import FiddleLayout from './components/FiddleLayout'; import UtilsLayout from './components/UtilsLayout'; @@ -14,7 +15,8 @@ const routes = ( - + +