1
0
mirror of https://github.com/oceanprotocol/market.git synced 2024-06-26 03:06:49 +02:00
This commit is contained in:
Matthias Kretschmann 2022-01-26 11:55:21 +00:00
parent 08a691ceee
commit c10ca06dbc
Signed by: m
GPG Key ID: 606EEEF3C479A91F
2 changed files with 4 additions and 3 deletions

View File

@ -4,12 +4,12 @@ export default function DebugOutput({
title, title,
output output
}: { }: {
title: string title?: string
output: any output: any
}): ReactElement { }): ReactElement {
return ( return (
<div style={{ marginTop: 'var(--spacer)' }}> <div style={{ marginTop: 'var(--spacer)' }}>
<h5>{title}</h5> {title && <h5>{title}</h5>}
<pre style={{ wordWrap: 'break-word' }}> <pre style={{ wordWrap: 'break-word' }}>
<code>{JSON.stringify(output, null, 2)}</code> <code>{JSON.stringify(output, null, 2)}</code>
</pre> </pre>

View File

@ -172,6 +172,7 @@ export default function Add({
isDisabled={ isDisabled={
!isValid || !isValid ||
!isWarningAccepted || !isWarningAccepted ||
!amount ||
amount === '' || amount === '' ||
amount === '0' amount === '0'
} }
@ -183,7 +184,7 @@ export default function Add({
amount={amount} amount={amount}
txId={txId} txId={txId}
/> />
{debug && <DebugOutput title="Collected values" output={values} />} {debug && <DebugOutput output={values} />}
</> </>
)} )}
</Formik> </Formik>