ghost-portal/packages/app-explorer/src/Main.tsx
kwingram25 2752bedc6e
Functional components (app-*) (#1559)
* Functional components (app-*)

* refactor

* refactor

* refactor

* refactor

* refactor

* Revert "refactor"

This reverts commit 300a12ed7de5b1000f32f5269dff67f5ee1c1515.

* onRemove
2019-08-29 17:45:02 +02:00

39 lines
1.0 KiB
TypeScript

// Copyright 2017-2019 @polkadot/app-explorer 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 { I18nProps } from '@polkadot/react-components/types';
import { KeyedEvent } from './types';
import React from 'react';
import { Columar, Column } from '@polkadot/react-components';
import BlockHeaders from './BlockHeaders';
import Events from './Events';
import Query from './Query';
import Summary from './Summary';
import translate from './translate';
interface Props extends I18nProps {
events: KeyedEvent[];
}
function Main ({ events, t }: Props): React.ReactElement<Props> {
return (
<>
<Query />
<Summary />
<Columar>
<Column headerText={t('recent blocks')}>
<BlockHeaders />
</Column>
<Column headerText={t('recent events')}>
<Events events={events} />
</Column>
</Columar>
</>
);
}
export default translate(Main);