File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
packages/docusaurus-theme-openapi-docs/src/theme/ApiDemoPanel/Response Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -10,8 +10,8 @@ import React from "react";
10
10
import { usePrismTheme } from "@docusaurus/theme-common" ;
11
11
import { useDoc } from "@docusaurus/theme-common/internal" ;
12
12
import { Loading } from "@nextui-org/react" ;
13
+ import ApiCodeBlock from "@theme/ApiDemoPanel/ApiCodeBlock" ;
13
14
import { useTypedDispatch , useTypedSelector } from "@theme/ApiItem/hooks" ;
14
- import CodeBlock from "@theme/CodeBlock" ;
15
15
import SchemaTabs from "@theme/SchemaTabs" ;
16
16
import TabItem from "@theme/TabItem" ;
17
17
import clsx from "clsx" ;
@@ -108,7 +108,8 @@ function Response({ item }: { item: NonNullable<ApiItem> }) {
108
108
} }
109
109
default
110
110
>
111
- < CodeBlock
111
+ { /* @ts -ignore */ }
112
+ < ApiCodeBlock
112
113
className = "openapi-demo__code-block openapi-response__status-code"
113
114
language = { response . startsWith ( "<" ) ? `xml` : `json` }
114
115
>
@@ -118,16 +119,17 @@ function Response({ item }: { item: NonNullable<ApiItem> }) {
118
119
the response here!
119
120
</ p >
120
121
) }
121
- </ CodeBlock >
122
+ </ ApiCodeBlock >
122
123
</ TabItem >
123
124
{ /* @ts -ignore */ }
124
125
< TabItem label = "Headers" value = "headers" >
125
- < CodeBlock
126
+ { /* @ts -ignore */ }
127
+ < ApiCodeBlock
126
128
className = "openapi-demo__code-block openapi-response__status-headers"
127
129
language = { response . startsWith ( "<" ) ? `xml` : `json` }
128
130
>
129
131
{ JSON . stringify ( headers , undefined , 2 ) }
130
- </ CodeBlock >
132
+ </ ApiCodeBlock >
131
133
</ TabItem >
132
134
</ SchemaTabs >
133
135
) : prettyResponse === "Fetching..." ? (
You can’t perform that action at this time.
0 commit comments