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:
parent
0e658d7257
commit
8d565a7ec7
@ -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
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user