mirror of
https://github.com/oceanprotocol/market.git
synced 2024-12-02 05:57:29 +01:00
refactor
This commit is contained in:
parent
c9b7b0cdd3
commit
51d8af651c
@ -3,6 +3,15 @@ import { MetadataPublishForm } from '../../../@types/MetaData'
|
|||||||
import styles from './index.module.css'
|
import styles from './index.module.css'
|
||||||
import { transformPublishFormToMetadata } from './utils'
|
import { transformPublishFormToMetadata } from './utils'
|
||||||
|
|
||||||
|
const Output = ({ title, output }: { title: string; output: any }) => (
|
||||||
|
<div>
|
||||||
|
<h5>{title}</h5>
|
||||||
|
<pre>
|
||||||
|
<code>{JSON.stringify(output, null, 2)}</code>
|
||||||
|
</pre>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
|
||||||
export default function Debug({
|
export default function Debug({
|
||||||
values
|
values
|
||||||
}: {
|
}: {
|
||||||
@ -26,21 +35,11 @@ export default function Debug({
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={styles.grid}>
|
<div className={styles.grid}>
|
||||||
<div>
|
<Output title="Collected Form Values" output={values} />
|
||||||
<h5>Collected Form Values</h5>
|
<Output title="Transformed DDO Values" output={ddo} />
|
||||||
<pre>
|
|
||||||
<code>{JSON.stringify(values, null, 2)}</code>
|
|
||||||
</pre>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div>
|
|
||||||
<h5>Transformed DDO Values</h5>
|
|
||||||
<pre>
|
|
||||||
<code>{JSON.stringify(ddo, null, 2)}</code>
|
|
||||||
</pre>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user