import React from 'react'; import { Query, Param } from './Query'; interface Props { whenQueryExists: React.ReactElement | null; } const params: Param[] = ['to', 'data', 'tokenSymbol', 'value', 'gaslimit', 'limit', 'readOnly']; export const WhenQueryExists: React.SFC = ({ whenQueryExists }) => ( (Object.values(queries).some(v => !!v) ? whenQueryExists : null)} /> );