* ui-signer pureComponentify * ui-react pureCompify * Status queue prop * ui-app Button * ui-app InputExtrinsic * apps, app-rpc, ui-app, ui-react * app-extrinsics, app-explorer, apps * fixes for tslint * more linter fixes * Update index.tsx * Update index.tsx * Update Nonce.tsx * Update index.tsx * Update Results.tsx * Update index.tsx * Update Queries.tsx * Update NodeInfo.tsx * Update index.tsx * Update Item.tsx * style fixes * TSLINTs
45 lines
1.1 KiB
TypeScript
45 lines
1.1 KiB
TypeScript
// Copyright 2017-2018 @polkadot/app-rpc authors & contributors
|
|
// This software may be modified and distributed under the terms
|
|
// of the ISC license. See the LICENSE file for details.
|
|
|
|
import { BareProps } from '@polkadot/ui-app/types';
|
|
import { QueueProps } from '@polkadot/ui-signer/types';
|
|
|
|
import './index.css';
|
|
|
|
import React from 'react';
|
|
|
|
import classes from '@polkadot/ui-app/util/classes';
|
|
import { QueueConsumer } from '@polkadot/ui-signer/Context';
|
|
|
|
import Results from './Results';
|
|
import Selection from './Selection';
|
|
|
|
type Props = BareProps & {};
|
|
|
|
export default class RpcApp extends React.PureComponent<Props> {
|
|
render () {
|
|
const { className, style } = this.props;
|
|
|
|
return (
|
|
<div
|
|
className={classes('rpc--App', className)}
|
|
style={style}
|
|
>
|
|
<QueueConsumer>
|
|
{({ queue, queueAdd }: QueueProps) => [
|
|
<Selection
|
|
key='add'
|
|
queueAdd={queueAdd}
|
|
/>,
|
|
<Results
|
|
key='results'
|
|
queue={queue}
|
|
/>
|
|
]}
|
|
</QueueConsumer>
|
|
</div>
|
|
);
|
|
}
|
|
}
|