// Copyright 2017-2019 @polkadot/apps authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. import { BareProps as Props } from '@polkadot/react-components/types'; // this is disabled, Chrome + WASM memory leak makes it slow & laggy. If enabled // we also need to export the default as hot(Apps) (last line) // import { hot } from 'react-hot-loader/root'; import React, { useState } from 'react'; import store from 'store'; import styled from 'styled-components'; import { withCalls } from '@polkadot/react-api'; import GlobalStyle from '@polkadot/react-components/styles'; import Signer from '@polkadot/react-signer'; import ConnectingOverlay from './overlays/Connecting'; import AccountsOverlay from './overlays/Accounts'; import { SideBarTransition, SIDEBAR_MENU_THRESHOLD } from './constants'; import Content from './Content'; import SideBar from './SideBar'; interface SidebarState { isCollapsed: boolean; isMenu: boolean; menuOpen: boolean; transition: SideBarTransition; } function Placeholder (): React.ReactElement { return (
); } const WarmUp = withCalls<{}>( 'derive.accounts.indexes', 'derive.balances.fees', 'derive.staking.overview' // This are very ineffective queries that // (a) adds load to the RPC node when activated globally // (b) is used in additional information (next-up) // 'derive.staking.all' // 'derive.staking.controllers' // 'query.staking.nominators' )(Placeholder); function Apps ({ className }: Props): React.ReactElement