* Create app-storage structure * Split shared components into ui-react-app * Cleanup @flow issues * Rename apps classes * Split with ui-react-app operational * Import es semantic-ui * Selection section/key split into 2 * Basic storage queries (no-params) in-place * Upgrades * No-param queries operational * Default values operational (dropdown) * Additional cleanups, constrolled value * @flow updates * @flow fixes * Move Params to ui-react-app (future-use in app-storage) * Fix final @flow issues * Query removal * Cleanups * Update README * Upgrades * Fixup cached components * Bump @polkadot/rx-react * Simple explorer animations * Additional (final) cleanups
36 lines
879 B
JavaScript
36 lines
879 B
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 { Header } from '@polkadot/primitives/header';
|
|
|
|
import React from 'react';
|
|
import Div from '@polkadot/rx-react/Div';
|
|
import withApiCall from '@polkadot/rx-react/with/apiCall';
|
|
|
|
import BlockHeader from '../BlockHeader';
|
|
import { blockHeaders as subject } from '../subjects';
|
|
import transform from './transform';
|
|
|
|
const apiMethod = {
|
|
method: 'newHead',
|
|
section: 'chain'
|
|
};
|
|
|
|
const apiOptions = {
|
|
subject,
|
|
transform
|
|
};
|
|
|
|
export default withApiCall(apiMethod, apiOptions)(Div, {
|
|
className: 'explorer--BlockHeaders',
|
|
format: (value?: Array<Header> = []): React$Node =>
|
|
value.map((value) => (
|
|
<BlockHeader
|
|
key={value.number.toString()}
|
|
value={value}
|
|
/>
|
|
))
|
|
});
|