1
0
mirror of https://github.com/oceanprotocol/market.git synced 2024-06-16 09:23:24 +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,
output
}: {
title: string
title?: string
output: any
}): ReactElement {
return (
<div style={{ marginTop: 'var(--spacer)' }}>
<h5>{title}</h5>
{title && <h5>{title}</h5>}
<pre style={{ wordWrap: 'break-word' }}>
<code>{JSON.stringify(output, null, 2)}</code>
</pre>

View File

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