mirror of
https://github.com/oceanprotocol/market.git
synced 2024-06-29 00:57:50 +02:00
make use of debug value
This commit is contained in:
parent
4d3c611189
commit
91afd8ed39
|
@ -8,6 +8,7 @@ import MetaSecondary from './MetaSecondary'
|
|||
import styles from './index.module.css'
|
||||
import AssetActions from '../AssetActions'
|
||||
import { DDO } from '@oceanprotocol/lib'
|
||||
import { useUserPreferences } from '../../../providers/UserPreferences'
|
||||
|
||||
export interface AssetContentProps {
|
||||
metadata: MetadataMarket
|
||||
|
@ -21,6 +22,7 @@ export default function AssetContent({
|
|||
}: AssetContentProps): ReactElement {
|
||||
const { datePublished } = metadata.main
|
||||
const { description, categories } = metadata.additionalInformation
|
||||
const { debug } = useUserPreferences()
|
||||
|
||||
return (
|
||||
<article className={styles.grid}>
|
||||
|
@ -52,9 +54,11 @@ export default function AssetContent({
|
|||
{/* <DeleteAction ddo={ddo} /> */}
|
||||
</div>
|
||||
|
||||
<pre>
|
||||
<code>{JSON.stringify(ddo, null, 2)}</code>
|
||||
</pre>
|
||||
{debug === true && (
|
||||
<pre>
|
||||
<code>{JSON.stringify(ddo, null, 2)}</code>
|
||||
</pre>
|
||||
)}
|
||||
</div>
|
||||
<div>
|
||||
<div className={styles.sticky}>
|
||||
|
|
|
@ -12,6 +12,7 @@ import { transformPublishFormToMetadata } from './utils'
|
|||
import Preview from './Preview'
|
||||
import { MetadataPublishForm } from '../../../@types/MetaData'
|
||||
import { useSiteMetadata } from '../../../hooks/useSiteMetadata'
|
||||
import { useUserPreferences } from '../../../providers/UserPreferences'
|
||||
|
||||
export default function PublishPage({
|
||||
content
|
||||
|
@ -19,6 +20,7 @@ export default function PublishPage({
|
|||
content: { form: FormContent }
|
||||
}): ReactElement {
|
||||
const { marketFeeAddress, marketFeeAmount } = useSiteMetadata()
|
||||
const { debug } = useUserPreferences()
|
||||
const { publish, publishError, isLoading, publishStepText } = usePublish()
|
||||
const navigate = useNavigate()
|
||||
|
||||
|
@ -85,25 +87,29 @@ export default function PublishPage({
|
|||
</div>
|
||||
</aside>
|
||||
|
||||
<div>
|
||||
<h5>Collected Form Values</h5>
|
||||
<pre>
|
||||
<code>{JSON.stringify(values, null, 2)}</code>
|
||||
</pre>
|
||||
</div>
|
||||
{debug === true && (
|
||||
<>
|
||||
<div>
|
||||
<h5>Collected Form Values</h5>
|
||||
<pre>
|
||||
<code>{JSON.stringify(values, null, 2)}</code>
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<h5>Transformed Values</h5>
|
||||
<pre>
|
||||
<code>
|
||||
{JSON.stringify(
|
||||
transformPublishFormToMetadata(values),
|
||||
null,
|
||||
2
|
||||
)}
|
||||
</code>
|
||||
</pre>
|
||||
</div>
|
||||
<div>
|
||||
<h5>Transformed Values</h5>
|
||||
<pre>
|
||||
<code>
|
||||
{JSON.stringify(
|
||||
transformPublishFormToMetadata(values),
|
||||
null,
|
||||
2
|
||||
)}
|
||||
</code>
|
||||
</pre>
|
||||
</div>
|
||||
</>
|
||||
)}
|
||||
</>
|
||||
)}
|
||||
</Formik>
|
||||
|
|
Loading…
Reference in New Issue
Block a user