* Remove extra subjects from app-explorer * Use bs58 addresses * Base upgrades subject -> onChange * app-storage & app-explorer works * Remove useless placeholder * Progres... * Rename Submission -> Selection * Baby steps... things display now... * setState operational * Explicit onChange * Work around eslint issues (!!!) * @flow fixes * Small styling updates * Small app content styling updates * Simplify
41 lines
901 B
JavaScript
41 lines
901 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 { I18nProps } from '@polkadot/ui-react-app/types';
|
|
import type { StorageQuery } from './types';
|
|
|
|
import React from 'react';
|
|
|
|
import translate from './translate';
|
|
import Query from './Query';
|
|
|
|
type Props = I18nProps & {
|
|
onRemove: (id: number) => void,
|
|
value?: Array<StorageQuery>
|
|
};
|
|
|
|
function Queries ({ className, onRemove, style, value }: Props): React$Node {
|
|
if (!value || !value.length) {
|
|
return null;
|
|
}
|
|
|
|
return (
|
|
<div
|
|
className={['storage--Queries', className].join(' ')}
|
|
style={style}
|
|
>
|
|
{value.map((query) =>
|
|
<Query
|
|
key={query.id}
|
|
onRemove={onRemove}
|
|
value={query}
|
|
/>
|
|
)}
|
|
</div>
|
|
);
|
|
}
|
|
|
|
export default translate(Queries);
|