Show explorer in light (but hide node info) (#1133)

This commit is contained in:
Jaco Greeff 2019-05-10 19:23:23 +02:00 committed by GitHub
parent 4e63e28d6f
commit b8ac690360
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 3 deletions

View File

@ -9,6 +9,7 @@ import './index.css';
import React from 'react';
import { Route, Switch } from 'react-router';
import Tabs, { TabItem } from '@polkadot/ui-app/Tabs';
import uiSettings from '@polkadot/ui-settings';
import translate from './translate';
import BlockInfo from './BlockInfo';
@ -49,12 +50,16 @@ class ExplorerApp extends React.Component<Props, State> {
render () {
const { basePath } = this.props;
const { items } = this.state;
const hidden = uiSettings.uiMode === 'full'
? []
: ['node'];
return (
<main className='explorer--App'>
<header>
<Tabs
basePath={basePath}
hidden={hidden}
items={items}
query={[undefined, 'query']}
/>

View File

@ -25,6 +25,7 @@ import transfer from './transfer';
const routes: Routes = appSettings.uiMode === 'light'
? ([] as Routes).concat(
dashboard,
explorer,
transfer,
staking,
democracy,
@ -57,8 +58,6 @@ const routes: Routes = appSettings.uiMode === 'light'
);
export default ({
default: appSettings.uiMode === 'light'
? 'transfer'
: 'explorer',
default: 'explorer',
routes
} as Routing);