1
0
mirror of https://github.com/oceanprotocol/docs.git synced 2024-11-26 19:49:26 +01:00

Fix build issue

This commit is contained in:
Akshay 2021-08-08 19:54:32 +02:00
parent 0e658d7257
commit 8d565a7ec7

View File

@ -7,35 +7,34 @@ const ResponseExample = ({ examples }) => {
const jsonExample = examples['application/json']
const plainText = examples['text/plain']
if (typeof document !== `undefined`) {
if (jsonExample) {
return (
<div>
<b>Example</b>
<br />
<code>
{typeof jsonExample === 'boolean' ? (
<code>{JSON.stringify(jsonExample)}</code>
) : (
<ReactJson
name={null}
src={jsonExample}
collapsed
enableClipboard={false}
/>
)}
</code>
</div>
)
} else if (plainText) {
return (
<div>
<b>Example</b>
<code>{plainText}</code>
</div>
)
}
if (jsonExample) {
return (
<div>
<b>Example</b>
<br />
<code>
{typeof jsonExample === 'boolean' ? (
<code>{JSON.stringify(jsonExample)}</code>
) : (
<ReactJson
name={null}
src={jsonExample}
collapsed
enableClipboard={false}
/>
)}
</code>
</div>
)
} else if (plainText) {
return (
<div>
<b>Example</b>
<code>{plainText}</code>
</div>
)
}
return null
}