ghost-portal/packages/apps/src/Connecting/index.js
Jaco Greeff 6753dc0ad2
Use @babel 7 (#52)
* Use @babel 7

* Use @babel 7

* Use custom webpack config

* Minify input css

* Remove @flow header form webpack.config

* Webpack config re-usable

* Split with vendor/main bundles

* Use hash for main entry, specify chunkHash

* Import base postcss config

* Hashing uses blake2

* Align number formats

* Use contenthash fro extracted css

* Format number directly

* Split runtime (better caching)
2018-05-17 14:51:41 +02:00

46 lines
1.1 KiB
JavaScript

// Copyright 2017-2018 Jaco Greeff
// This software may be modified and distributed under the terms
// of the ISC license. See the LICENSE file for details.
// @flow
import type { I18nProps } from '@polkadot/ui-app/types';
import './Connecting.css';
import React from 'react';
import classes from '@polkadot/ui-app/util/classes';
import withApiCall from '@polkadot/ui-react-rx/with/apiCall';
import translate from '../translate';
type Props = I18nProps & {
value: boolean
};
function Connecting ({ className, style, value, t }: Props): React$Node {
if (value) {
return null;
}
// 'ui inverted page modals dimmer transition visible active'
return (
<div
className={classes('apps--Connecting', className)}
style={style}
>
<div className='apps--Connecting-text'>
{t('connecting.disconnected', {
defaultValue: 'You are not connected to a node. Ensure that your node is running and that the Websocket endpoint is reachable.'
})}
</div>
</div>
);
}
export default translate(
withApiCall({ name: 'isConnected' })(
Connecting
)
);